SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
1.: Set Theory
Look up a roulette wheel diagram. The following sets are defined:
A = the set of red numbers
B = the set of black numbers
C = the set of green numbers
D = the set of even numbers
E = the set of odd numbers
F = {1,2,3,4,5,6,7,8,9,10,11,12}
From these, determine each of the following:
A?B
A?D
B?C
C?E
B?F
E?F
2. Relations and Functions
The implementation of the program that runs the game involves testing. One of the necessary
tests is to see if the simulated spins are random. Create an n-ary relation, in table form, that
depicts possible results of 10 trials of the game. Include the following results of the game:
Number
Color
Odd or even (note: 0 and 00 are considered neither even nor odd.)
Also include a primary key. What is the value of n in this n-ary relation?
3. Graphs and Trees
Create a tree that models the following scenario. A player decides to play a maximum of 4 times,
betting on red each time. The player will quit after losing twice. In the tree, any possible last
plays will be an ending point of the tree. Branches of the tree should indicate the winning or
losing, and how that affects whether a new play is made.
4. Combinatorics and Probability
In the roulette game, what is the probability of an outcome of:
Any odd number
Any green number
Any number that is red or green
Any number that is red and even
You are asked by a state government official to investigate whether under a proposed license
plate system, there will be enough license plate codes for the state. There are 2 schemes
proposed:
Each license plate is to show 3 letters, followed by 3 numbers, with no restrictions on repeated
characters or their order. The only restriction is that the letters I and O are not to be used.
The second scheme is the same as above, except no letter or number can appear twice in the
same license plate.
Under each scheme, how many different license plates can be produced?
Under which scheme is it more likely that there will be enough license plates? Explain.
5. Algorithm Analysis
Consider searching algorithms on the following array of data:
[22 21 9 4 16 2 10 14 20 31 26 19 17 28 8 13]
Suppose you want to implement a searching algorithm to see if the data set contains the number
19. Demonstrate how the search would go if you used:
A sequential search
A binary search
State the runtime for each of the searches, in this example, and for general data sets of size n.
Address the issue of the order of the data in binary searching.
Suppose an algorithm that processes a data set of size 8 has a runtime of 72. The same algorithm
has a runtime of 110 when applied to a data set of size 10; and when applied to a data set of size
20, it has a runtime of 420. Using big-O notation, state the runtime for this algorithm for the
general case of a data set of size n.
Suppose you develop an algorithm that processes the first element of an array (length of n), then
processes the first 2 elements, then the first 3 elements, and so on, until the last iteration of a
loop, when it processes all elements. Thus, if n = 4, the runtime would be 1 + 2 + 3 + 4 = 10.
Create a table that depicts the runtime for arrays of length 1 to 10. Would you expect the general
runtime to be O(n), O(n2), O(n3), or some other function of n? Explain.
Solution
ANS A = set of red numbers = {1, 27, 25, 12, 19, 18, 21, 16, 23, 14, 9, 30, 7, 32, 5,
34, 3, 36} B = set of black numbers = {10, 29, 8, 31, 6, 33, 4, 35, 2, 28, 26, 11, 20, 17, 22, 15,
24, 13} C = set of green numbers = {00, 0} D = set of even numbers = {10, 12, 8, 18, 6, 16, 4,
14, 2, 28, 26, 30, 20, 32, 22, 34, 24, 36, 0, 00} E = set of odd numbers = {1, 27, 25, 29, 19, 31,
21, 33, 23, 35, 9, 11, 7, 17, 5, 15, 3, 13} To describe how the notion of union and intersection
apply to retrieving records in a database, I’ll use an example of two sets contained in an auto
dealer database. Set A and B represent garages that contain the make of vehicles parked inside.
Set A (known as garage A) contains the members (or makes of vehicles parked inside) which are
Chevy, Audi, Ford, Saab, Lincoln, and Chrysler. Set A is expressed below: A = {Chevy, Audi,
Ford, Saab, Lincoln, Chrysler} Set B (known as garage B) contains the members (or makes of
vehicles parked inside) which are Mercury, BMW, Ford, Saab, Dodge, and Audi. Set B is
expressed below: B = {Mercury, BMW, Ford, Saab, Dodge, Audi}

Weitere ähnliche Inhalte

Ähnlich wie 1. Set TheoryLook up a roulette wheel diagram. The following se.pdf

data structure and algorithm Array.pptx btech 2nd year
data structure and algorithm  Array.pptx btech 2nd yeardata structure and algorithm  Array.pptx btech 2nd year
data structure and algorithm Array.pptx btech 2nd year
palhimanshi999
 
HUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2D
HUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2DHUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2D
HUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2D
eve2xjazwa
 

Ähnlich wie 1. Set TheoryLook up a roulette wheel diagram. The following se.pdf (20)

[Question Paper] Logic and Discrete Mathematics (Revised Course) [June / 2016]
[Question Paper] Logic and Discrete Mathematics (Revised Course) [June / 2016][Question Paper] Logic and Discrete Mathematics (Revised Course) [June / 2016]
[Question Paper] Logic and Discrete Mathematics (Revised Course) [June / 2016]
 
Array sheet
Array sheet Array sheet
Array sheet
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematics
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Ee693 sept2014quiz1
Ee693 sept2014quiz1Ee693 sept2014quiz1
Ee693 sept2014quiz1
 
Mathematicalfoundationofcomputerscience
MathematicalfoundationofcomputerscienceMathematicalfoundationofcomputerscience
Mathematicalfoundationofcomputerscience
 
[Question Paper] Logic and Discrete Mathematics (Revised Course) [January / 2...
[Question Paper] Logic and Discrete Mathematics (Revised Course) [January / 2...[Question Paper] Logic and Discrete Mathematics (Revised Course) [January / 2...
[Question Paper] Logic and Discrete Mathematics (Revised Course) [January / 2...
 
R for Statistical Computing
R for Statistical ComputingR for Statistical Computing
R for Statistical Computing
 
Cs101 endsem 2014
Cs101 endsem 2014Cs101 endsem 2014
Cs101 endsem 2014
 
Ansi c
Ansi cAnsi c
Ansi c
 
MFCS UNIT-III.pptx
MFCS UNIT-III.pptxMFCS UNIT-III.pptx
MFCS UNIT-III.pptx
 
algo1
algo1algo1
algo1
 
SATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHSSATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHS
 
data structure and algorithm Array.pptx btech 2nd year
data structure and algorithm  Array.pptx btech 2nd yeardata structure and algorithm  Array.pptx btech 2nd year
data structure and algorithm Array.pptx btech 2nd year
 
KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)
 
MBA classes in Mumbai
MBA classes in MumbaiMBA classes in Mumbai
MBA classes in Mumbai
 
2.6b scatter plots and lines of best fit
2.6b scatter plots and lines of best fit2.6b scatter plots and lines of best fit
2.6b scatter plots and lines of best fit
 
Results of Round 1
Results of Round 1Results of Round 1
Results of Round 1
 
HUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2D
HUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2DHUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2D
HUM105 v7Divine Roles Across CulturesHUM105 v7Page 2 of 2D
 
Internship exam round1
Internship exam round1Internship exam round1
Internship exam round1
 

Mehr von akhilc61

1. use fundamental identities to simply the expression cot tan .pdf
1. use fundamental identities to simply the expression cot  tan .pdf1. use fundamental identities to simply the expression cot  tan .pdf
1. use fundamental identities to simply the expression cot tan .pdf
akhilc61
 
1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf
1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf
1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf
akhilc61
 
1. Philosophy is related to many other fields of study.           .pdf
1. Philosophy is related to many other fields of study.           .pdf1. Philosophy is related to many other fields of study.           .pdf
1. Philosophy is related to many other fields of study.           .pdf
akhilc61
 

Mehr von akhilc61 (18)

1. use fundamental identities to simply the expression cot tan .pdf
1. use fundamental identities to simply the expression cot  tan .pdf1. use fundamental identities to simply the expression cot  tan .pdf
1. use fundamental identities to simply the expression cot tan .pdf
 
1. Two fair dice are rolled. What is the probability that at least o.pdf
1. Two fair dice are rolled. What is the probability that at least o.pdf1. Two fair dice are rolled. What is the probability that at least o.pdf
1. Two fair dice are rolled. What is the probability that at least o.pdf
 
1. Two coins are tossed. Find the probability that one coin is a hea.pdf
1. Two coins are tossed. Find the probability that one coin is a hea.pdf1. Two coins are tossed. Find the probability that one coin is a hea.pdf
1. Two coins are tossed. Find the probability that one coin is a hea.pdf
 
1. The Voyage of the St. Andrew Throughout the picturesque valle.pdf
1. The Voyage of the St. Andrew Throughout the picturesque valle.pdf1. The Voyage of the St. Andrew Throughout the picturesque valle.pdf
1. The Voyage of the St. Andrew Throughout the picturesque valle.pdf
 
1. The sample deviation of sodium concentration in whole blood (mEq.pdf
1. The sample deviation of sodium concentration in whole blood (mEq.pdf1. The sample deviation of sodium concentration in whole blood (mEq.pdf
1. The sample deviation of sodium concentration in whole blood (mEq.pdf
 
1. The repeated-measures analysis of variance can be viewed as a two.pdf
1. The repeated-measures analysis of variance can be viewed as a two.pdf1. The repeated-measures analysis of variance can be viewed as a two.pdf
1. The repeated-measures analysis of variance can be viewed as a two.pdf
 
1. The most common intelligence quotient (IQ) scale is normally dist.pdf
1. The most common intelligence quotient (IQ) scale is normally dist.pdf1. The most common intelligence quotient (IQ) scale is normally dist.pdf
1. The most common intelligence quotient (IQ) scale is normally dist.pdf
 
1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf
1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf
1. The main grain in Mesoamerica is a. Squash b. Chiles c. Corn d. .pdf
 
1. Suppose there are 15 candidates for 3 positions at a community fo.pdf
1. Suppose there are 15 candidates for 3 positions at a community fo.pdf1. Suppose there are 15 candidates for 3 positions at a community fo.pdf
1. Suppose there are 15 candidates for 3 positions at a community fo.pdf
 
1. Suppose that Tina and Jack are in two different sections of t.pdf
1. Suppose that Tina and Jack are in two different sections of t.pdf1. Suppose that Tina and Jack are in two different sections of t.pdf
1. Suppose that Tina and Jack are in two different sections of t.pdf
 
1. Suppose that ( X, Y ) is uniformly distributed over the region de.pdf
1. Suppose that ( X, Y ) is uniformly distributed over the region de.pdf1. Suppose that ( X, Y ) is uniformly distributed over the region de.pdf
1. Suppose that ( X, Y ) is uniformly distributed over the region de.pdf
 
1. Our Simpsons Fan Club has 10 male and 6 female members. We must s.pdf
1. Our Simpsons Fan Club has 10 male and 6 female members. We must s.pdf1. Our Simpsons Fan Club has 10 male and 6 female members. We must s.pdf
1. Our Simpsons Fan Club has 10 male and 6 female members. We must s.pdf
 
1. Predicting the number of juvenile violent crime arrests when 25 .pdf
1. Predicting the number of juvenile violent crime arrests when 25 .pdf1. Predicting the number of juvenile violent crime arrests when 25 .pdf
1. Predicting the number of juvenile violent crime arrests when 25 .pdf
 
1. Startup your instance. Connect as the DBA user for your database..pdf
1. Startup your instance. Connect as the DBA user for your database..pdf1. Startup your instance. Connect as the DBA user for your database..pdf
1. Startup your instance. Connect as the DBA user for your database..pdf
 
1. Regression is always a superior forecasting method to exponential.pdf
1. Regression is always a superior forecasting method to exponential.pdf1. Regression is always a superior forecasting method to exponential.pdf
1. Regression is always a superior forecasting method to exponential.pdf
 
1. Philosophy is related to many other fields of study.           .pdf
1. Philosophy is related to many other fields of study.           .pdf1. Philosophy is related to many other fields of study.           .pdf
1. Philosophy is related to many other fields of study.           .pdf
 
1. Please explain why there is a critical need within the economy an.pdf
1. Please explain why there is a critical need within the economy an.pdf1. Please explain why there is a critical need within the economy an.pdf
1. Please explain why there is a critical need within the economy an.pdf
 
1. The Central Intelligence Agency has specialists who analyze the f.pdf
1. The Central Intelligence Agency has specialists who analyze the f.pdf1. The Central Intelligence Agency has specialists who analyze the f.pdf
1. The Central Intelligence Agency has specialists who analyze the f.pdf
 

Kürzlich hochgeladen

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Kürzlich hochgeladen (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

1. Set TheoryLook up a roulette wheel diagram. The following se.pdf

  • 1. 1.: Set Theory Look up a roulette wheel diagram. The following sets are defined: A = the set of red numbers B = the set of black numbers C = the set of green numbers D = the set of even numbers E = the set of odd numbers F = {1,2,3,4,5,6,7,8,9,10,11,12} From these, determine each of the following: A?B A?D B?C C?E B?F E?F 2. Relations and Functions The implementation of the program that runs the game involves testing. One of the necessary tests is to see if the simulated spins are random. Create an n-ary relation, in table form, that depicts possible results of 10 trials of the game. Include the following results of the game: Number Color Odd or even (note: 0 and 00 are considered neither even nor odd.) Also include a primary key. What is the value of n in this n-ary relation? 3. Graphs and Trees Create a tree that models the following scenario. A player decides to play a maximum of 4 times,
  • 2. betting on red each time. The player will quit after losing twice. In the tree, any possible last plays will be an ending point of the tree. Branches of the tree should indicate the winning or losing, and how that affects whether a new play is made. 4. Combinatorics and Probability In the roulette game, what is the probability of an outcome of: Any odd number Any green number Any number that is red or green Any number that is red and even You are asked by a state government official to investigate whether under a proposed license plate system, there will be enough license plate codes for the state. There are 2 schemes proposed: Each license plate is to show 3 letters, followed by 3 numbers, with no restrictions on repeated characters or their order. The only restriction is that the letters I and O are not to be used. The second scheme is the same as above, except no letter or number can appear twice in the same license plate. Under each scheme, how many different license plates can be produced? Under which scheme is it more likely that there will be enough license plates? Explain. 5. Algorithm Analysis Consider searching algorithms on the following array of data: [22 21 9 4 16 2 10 14 20 31 26 19 17 28 8 13] Suppose you want to implement a searching algorithm to see if the data set contains the number 19. Demonstrate how the search would go if you used: A sequential search A binary search State the runtime for each of the searches, in this example, and for general data sets of size n. Address the issue of the order of the data in binary searching.
  • 3. Suppose an algorithm that processes a data set of size 8 has a runtime of 72. The same algorithm has a runtime of 110 when applied to a data set of size 10; and when applied to a data set of size 20, it has a runtime of 420. Using big-O notation, state the runtime for this algorithm for the general case of a data set of size n. Suppose you develop an algorithm that processes the first element of an array (length of n), then processes the first 2 elements, then the first 3 elements, and so on, until the last iteration of a loop, when it processes all elements. Thus, if n = 4, the runtime would be 1 + 2 + 3 + 4 = 10. Create a table that depicts the runtime for arrays of length 1 to 10. Would you expect the general runtime to be O(n), O(n2), O(n3), or some other function of n? Explain. Solution ANS A = set of red numbers = {1, 27, 25, 12, 19, 18, 21, 16, 23, 14, 9, 30, 7, 32, 5, 34, 3, 36} B = set of black numbers = {10, 29, 8, 31, 6, 33, 4, 35, 2, 28, 26, 11, 20, 17, 22, 15, 24, 13} C = set of green numbers = {00, 0} D = set of even numbers = {10, 12, 8, 18, 6, 16, 4, 14, 2, 28, 26, 30, 20, 32, 22, 34, 24, 36, 0, 00} E = set of odd numbers = {1, 27, 25, 29, 19, 31, 21, 33, 23, 35, 9, 11, 7, 17, 5, 15, 3, 13} To describe how the notion of union and intersection apply to retrieving records in a database, I’ll use an example of two sets contained in an auto dealer database. Set A and B represent garages that contain the make of vehicles parked inside. Set A (known as garage A) contains the members (or makes of vehicles parked inside) which are Chevy, Audi, Ford, Saab, Lincoln, and Chrysler. Set A is expressed below: A = {Chevy, Audi, Ford, Saab, Lincoln, Chrysler} Set B (known as garage B) contains the members (or makes of vehicles parked inside) which are Mercury, BMW, Ford, Saab, Dodge, and Audi. Set B is expressed below: B = {Mercury, BMW, Ford, Saab, Dodge, Audi}