Hi,
If I have boolean variable x1
And assuming multiplication means "AND" for boolean expressions;
and that addition means "OR"
Then
x1 = x1^2 = x1^3 = ...=x1^k, k >= 1
Since "x1 and x1 and x1 ... and x1" = x1;
it is true if x1 is true and false if x1 is false.
How can a boolean expression with variables taken
to various powers be simplified?
I can't take credit for this; but Dave Rusin showed
This isn't specifically Maple-related; but mathematics-related;
related to Linear Algebra and Modern Algebra.
While reviewing Linear Algebra; I ran across the
concept of "Similar Matrices"; which are defined as:
if A,B are nxn matrices and
there exists invertible nxn matrix P such that
P^(-1)*A*P = B
then
A is similar to B
The payoff was:
if A, B are similar then
they "have the same eigenvalues"
(the characteristic equation is same for both A and B).
(Here we are talking about the group of invertible nxn matrices,
with operation matrix multiplication)
--
The command "latex(expression)" attempts to generate LaTeX commands that will recreate the expression in LaTeX. For example; latex(%) will try to generate LaTeX commands to recreate the last output from Maple.
Let's say I had just entered the Maple command to display an integral; for example:
Int(Int(Int(rho^2*sin(phi),rho=sec(phi)..5*sec(phi)),phi=Pi/6..Pi/3),theta=0..2*Pi);
If I would like to put that same integral in a LaTeX document; I could enter the
following command:
latex(%);
Which, in Maple 9, returned:
\int _{0}^{2\,\pi }\!\int _{1/6\,\pi }^{1/3\,\pi }\!\int _{\sec
Hi,
I ran into this in my Modern Algebra class; and decided it might be of interest.
We were given the problem to:
"Find the least prime p s.t.
congruent to 1 (mod p^2)"
EVERY prime p > 2 has the property,
congruent to 1 (mod p), by Fermat's Theorem (since 2 does not divide such prime p).
But, mod p^2 is another story.
This was given in a class where everything is done by hand calculation, based on theorems. I couldn't come up with any way to determine it other than brute force.
Here is a tiny Maple snippet which finds it:
Hi,
I had an issue where I wanted the quotient of two integers a and b; the quotient q from the division algorithm for a/b which finds a = b*q + r, 0 <= r < b
I was not sure how to obtain it. Since,
a := 7;
b := 3;
q := a / b; # returns fraction 7/3
Received some help from G. A. Edgar from Ohio State and Joe Riel from Maple; who clued me into the use of 'iquo' to obtain this.
a := 7;
b := 3;
q := iquo(a,b,'r'); # q = 2, r = 1
I was experimenting with floor(a/b), but I am sure this is more efficient (no conversion between fraction and integer);
There is 'irem' which just determines the remainder from integer division. The 3rd argument in iquo is optional ... and returns the remainder from the division.
I have some background in computer science; which may help explain my interest in Maple. :)
In my Computer Science studies; one thing we were required to do was to minimize boolean
expressions. I found this to be extremely tedious; something that you really want the computer to do for you. At least; that is how I saw it.
So, I always thought that I would write a program to do; what we were doing manually. The result is the following application:
One thing I enjoy is implementing algorithms in Maple.
The latest thing I worked on was Kruskal's Algorithm for finding a minimum spanning tree in a connected and weighted graph. It was something we covered in my summer math class which covered topics in discrete math.
Here is a link to the algorithm in the application center:
http://www.maplesoft.com/applications/app_center_view.aspx?AID=2133
I believe I have implemented the cycle-detection correctly; but I think there is likely a more efficient way. I may update it later if I come up with a better way.

The last point I would make about the dice problem; is to mention a way to graph the probabilities ... as n increases.
Given that the following function determines the probability of all faces being shown when n dice are rolled (from previous work):
P := n -> 1 - ((add((-1)^(k+1)*binomial(6,k)*(6-k)^n,k=1..5))/(6^n));

Let's continue on with the dice example; determining the probability of all faces showing when n dice are thrown. We estimated this by running a simulation in maple; and comparing the frequency of successes to the total number of experiments.
There is a way to determine the probability without running trials. The problem can be solved combinatorially.
One way to determine the probability of all faces shown; is to determine the the probability that all faces are NOT shown (call this probability B). Then the probability that all faces are shown = 1 - B.
Let's take another look at the dice rolling example:
Simulate rolling 8 dice 10 times.
roll := rand(1..6);
for i from 1 to 10 do;
dice := ['roll()' $8]; # dice contains 8 random values, each from 1..6
end do;
Let's say you want to check the list "dice" to see if all faces are
represented.
One way to do this is to write a proc which creates an array indexed
1..6; and initialize the array to zero; and then check the dice list ...
incrementing the associated array index for each value in the dice list.
Finally ... check the built array to see if all index values are non-zero.
1 hour 58 min ago
1 hour 41 min ago
2 hours 5 min ago
2 hours 9 min ago
2 hours 24 min ago
2 hours 33 min ago
2 hours 46 min ago
5 hours 20 min ago
5 hours 45 min ago
5 hours 46 min ago