Download presentation
1
By: Marlene Reyna and Guadalupe Esquivel
Math 170 Project Part 2 Section 4.6 #33 Section 9.3 #29 Section 9.6 #18 By: Marlene Reyna and Guadalupe Esquivel
2
Section 4.6 #33 Eratosthenes
He was born in 276 BC in Shahhat, Libya. He was a Greek mathematician, geographer and astronomer. In number theory, he introduced the sieve of Eratosthenes, an efficient method of identifying prime numbers. He died in 194 BC in Alexandria, Egypt.
3
Section 4.6 #33 The sieve of Eratosthenes provides a way to find all prime numbers less than or equal to some fixed number n. To construct it, write out all the integers from 2 to n. Cross out all multiples of 2 except 2 itself, then all multiples of 3 except 3 itself, then all multiples of 5 except 5 itself, and so forth. Continue crossing out the multiples of each successive prime number up to √n. The numbers that are not crossed out are all the prime numbers from 2 to n. Here is a sieve of Eratosthenes that includes the numbers from 2 to 27. The multiples of 2 are crossed out with a /, the multiples of 3 with a \, and the multiples of 5 with a —.
4
Use the sieve of Eratosthenes to find all prime numbers less than 100
Without multiples of 2 Without multiples of 3 and 5 Without multiples of 7 and 11
5
List of all prime numbers
less than 100:
6
Section 9.3 #29 Refer to Example 9.3.5
Example Internet Addresses An example of an IP address is , where the 32 bits have been divided into four groups of 8 for easier reading. To make the readings even easier, IP addresses are normally written as “dotted decimals,” in which each group of 8 bits is converted into a decimal number between 0 and 255. For instance, the IP address above converts into In order to accommodate the various sizes of the local networks connected through the Internet, the network IDs are divided into several classes, the most important of which are called A, B, and C. In every class, a host ID may NOT consist of either all 0’s or all 1’s. Class A network IDs are used for very large local networks. The left-most bit is set to 0, and the left-most 8 bits give the full network ID. The remaining 24 bits are used for individual host IDs. However, neither nor is allowed as a network ID for a class A IP address.
7
Class B network IDs are used for medium to large local networks
Class B network IDs are used for medium to large local networks. The two left-most bits are set to 10, and the left-most 16 bits give the full network ID. The remaining 16 bits are used for individual host IDs. Class C network IDs are used for small local networks. The three left-most bits are set to 110, and the left-most 24 bits give the full network ID. The remaining 8 bits are used for individual host IDs.
8
Ans: 27- 2 = 128-2 = 126 possible class A networks.
a. Write the following IP address in dotted decimal form: = = = =238 Ans: b. How many Class A networks can there be? The network ID for a Class A network consists of 8 bits and begins with 0. There are two choices for each of the remaining 7 positions meaning that the total number of possible network IDs is 27 but because neither nor is allowed, the total is reduced by 2. Ans: = = 126 possible class A networks.
9
c. What is the dotted decimal form of the IP address for a computer in a Class A network?
Let w.x.y.z be the dotted decimal form of the IP address for a computer in a Class A network. Since neither nor is allowed as a network ID for a Class A IP address, the Network ID part of a Class A IP address goes from to This means that w can be any integer from 1 through 126. The remaining variables x,y,z, which correspond to the Host ID for a Class A IP address, can be any integer from: to However, x, y, and z can’t all be 0 or 255 since a host ID may NOT consist of either all 0’s or all 1’s. Ans: The dotted decimal form of the IP address for a computer in a Class A network is w.x.y.z where 1≤ w ≤ 126, 0 ≤ x ≤ 255, 0 ≤ y ≤ 255, and 0 ≤ z ≤ 255. However, x,y, and z are not allowed to all be 0 or 255. w x y z to to
10
d. How many host IDs can there be for a Class A network?
For a class A network, 24 bits are used for host IDs. Having two choices (either 0 or 1) for each of 24 positions gives a total of 216 host IDs. But because two of these are NOT allowed (all 0’s and all 1’s), the total number of host IDs is e. How many class C networks can there be? The network ID for a Class C network consists of 24 bits and begins with 110. Because there are two choices for each of the remaining 21 positions (either 0 or 1), the total number of possible network IDs is 221.
11
G. How many host IDs can there be for a Class C network?
f. What is the dotted decimal form of the IP address for a computer in a Class C network? Let w.x.y.z be the dotted decimal form of the IP address for a computer in a Class C network. The network ID part of a Class C IP address goes from to As dotted decimals, these numbers range from to This means that 192 ≤ w ≤ 220, 0 ≤ x ≤ 255, 0 ≤ y ≤ 255. Since z is the host ID, it must go from to since a host ID may NOT consist of either all 0’s or all 1’s. This means that 1 ≤ z ≤ 254. Ans: w.x.y.z is the dotted decimal form of the IP address for a computer in a Class C network where 192 ≤ w ≤ 220, 0 ≤ x ≤255, 0 ≤ y ≤ 255, and 1 ≤ z ≤ 254. G. How many host IDs can there be for a Class C network? For a class C network, 8 bits are used for host IDs. Having two choices (either 0 or 1) for each of 8 positions gives a total of 28 host IDs. But because two of these are NOT allowed (all 0’s and all 1’s), the total number of host IDs is = = = w x y z = = =
12
h. How can you tell, by looking at the first of the four numbers in the dotted decimal form of an IP address, what kind of network the address is from? Explain. Assume w.x.y.z is the dotted decimal form of an IP address. If 1 ≤ w ≤ 126 then that means that we are looking at a Class A network(Refer to problem C). If 192 ≤ w ≤ 220, then that means that we are looking at a Class C network (Refer to problem F). If 128 ≤ w ≤ 191 then that means that we are looking at a Class B network since the network ID part of a Class B IP address goes from : to As dotted decimals, these numbers range from to This means that 128 ≤ w ≤ 191. I. An IP address is What class of network does it come from? It comes from a Class B network since the dotted decimal form of a Class B IP address is w.x.y.z where 128 ≤ w ≤ 191.(Refer to problem h) J. An IP address is What class of network does it come from? It comes from a Class C network since the dotted decimal form of a Class C IP address is w.x.y.z where 192 ≤ w ≤ 220.(Refer to problem f) = = = =
13
Section 9.6 #18 A large pile of coins consists of pennies, nickels, dimes and quarters. a. How many different collections of 30 coins can be chosen if there are at least 30 of each kind of coin? b. If the pile contains only 15 quarters but at least 30 of each other coin, how many collections of 30 coins can be chosen? c. If the pile contains only 20 dimes but at least 30 of each other coin, how many collections of 30 coins can be chosen? d. If the pile contains only 15 quarters and only 20 dimes but at least 30 of each other coin, how many collections of 30 coins can be chosen?
14
To solve the following problems we use combinations:
C(n,k)= n = n! k (n-k)! k! a. How many different collections of 30 coins can be chosen if there are at least 30 of each kind of coin? There are 30 pennies, 30 nickels, 30 dimes and 30 quarters. There are a total of 120 coins C(120, 30)= ! _ 90! 30! b. If the pile contains only 15 quarters but at least 30 of each other coin, how many collections of 30 coins can be chosen? There are a total of 105 coins in this pile. C(105,30)= ! 75! 30!
15
c. If the pile contains only 20 dimes but at least 30 of each other coin, how many collections of 30 coins can be chosen? There are a total of 110 coins in this pile C(110,30)= ! _ 80! 30! d. If the pile contains only 15 quarters and only 20 dimes but at least 30 of each other coin, how many collections of 30 coins can be chosen? There are a total of 95 coins in this pile C(95,30)= ! _ 65! 30!
16
Bibliography Eratosthenes Biography. (n.d). Retrieved November 16,2013, from Biography Base:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.