Вы находитесь на странице: 1из 9

Discrete Math Project II

Spring 2014
William Miller
Rafael Diaz
Savanah Yam
A. Using the Test of Primality, we square root 667 and
it equals 25.82. We then round up or down to the
closest prime number. In this case, we chose 29.
Luckily it divided up into 23. So therefore, 667 is
not a prime number.
B. Using the Test of Primality, we square root 557 and
it equals 23.6. We then round up or down to the
closest prime number. In this case, we chose 19.
However, 557 divided by 19 equals 29.3
Therefore, 557 is a prime number.
C. Using the Test of Primality, we square root 527 and
it equals 22.95. We then round up or down to the
closest prime number. In this case, we chose 19.
However, 527 divided by 19 equals 27.7
Therefore, 527 is a prime number.
D. Using the Test of Primality, we square root 613 and
it equals 24.7. We then round up or down to the
closest prime number. In this case, we chose 29.
However, 613 divided by 29 equals 21.1
Therefore, 613 is a prime number.
Given an integer n>1, to test whether n is prime check to see if it is
divisible by a prime number less than or equal to its square root. If it is
not divisible by any of these numbers, then it is prime. Use the Test for
Primality to determine whether the following numbers are prime or not.
A. Start off by using the Inclusion/Exclusion Rule
formula, n(AuB)= n(A) + n(B)-n(AnB). This will get
the multiples of 2 and 9 and add them minus the
doubles that are multiples of 2 and 9. Divide your
following numbers and the first multiple that 2 and
9 go into by your range. Add the totals of n(A) and
n(B) minus n(AuB) to equal 556.
B. You put the total number of multiples over the
amount of numbers in your range. and divide. This
will give you the probability of landing on a multiple
of 2 or 9.
C. You subtract the total about in your range with the
amount of multiples of 2 and 9.
A. How many integers from 1 through 1,000 are multiples of 2 or
multiples of 9?
B. Suppose an integer from 1 through 1,000 is chosen at random. Use
the result of part (a) to find the probability that the integer is a multiple
of 2 or a multiple of 9.
C. How many integers from 1 through 1,000 are neither multiples of 2
nore multiples of 9?
We werent able to solve this problem because we
didnt know how to go about understanding what it
was asking for. We exhausted our resources when
trying to solve it and still came up short. We sent our
professor an email to see if she could assist us with
understanding the problem but we did not receive a
reply from her.
12. We need to use Dijkstras algorithm which has us
find the fastest route from one destination/vertex to
another. For this graph we start at Nashville with a
weight of 0 and pick the minimum of edge, in this
case it was Louisville. Next add the edge with the
vertex weight to get reach the next connected with
your current destination except for your previous
destination. Continue this path until you reach the
end vertex. The chart below shows the edges
considered in finding the fastest path.
12. Use Dijkstras algorithm for the airline route system of Figure 10.7.3
to find the shortest distance from Nashville to Minneapolis. Make a
table similar to the table 10.7.1 to show the action of the algorithm.
14. We need to use Dijkstras algorithm, again. For this
graph we start at a with a weight of 0 and pick the
minimum of edge, in this case it was b. Next add the
edge with the vertex weight to get reach the next
connected with your current destination except for
your previous destination. Continue this path until
you reach the end vertex, in this case z. The chart
below shows the edges considered in finding the
fastest path. Keep going until you reach your final
destination.
14. Look at the picture for the question.
Mathematician Biography
Edsger Dijkstra
A Dutch computer scientist, Dijkstra came up with an algorithm that condensed both Prims
and Kruskals algorithm. He contributed to the both algorithms but mainly focused on Prims.
Kruskals algorithm states that it minimizes the weighted graph but connecting every vertices with
the least amount of edges. Prims algorithm is similar to Kruskals except the first vertex is given, it
is the starting location and then one would use Kruskals to finish off the minimal spanning tree. All
these algorithms can minimize the length of an undirected weighted graph. Both do not make a
circuit but they both come out to have the same amount of edge length. Dijkstra focused his work
around Prims algorithm, and rediscovered it. His contribution to graph theory allows people to
compute the minimal paths/lengths between multiple vertexts. Dijkstras algorithm can be applied
in the real world by computing the shortest distance to travel and cover every spot or routing
hotspots.


Edsger Dijkstra
Bibliography
"Edsger W. Dijkstra." Wikipedia. Wikimedia Foundation, 05
Nov. 2014. Web. 15 May 2014.