Login|Contact Us
Question and Answer

Homework

Ask a Homework Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

Discrete Mathematics

 
RRJha's Avatar
  • Answered by:RRJha
  • Tutor
  • Positive Feedback: 99.7 %
  • Accepted Answers: 2168
Verified Expert
in Homework

Recent Feedback

Positive
It seemed to take quite a bit of time to get an answer but that is because I was...
Positive
Great! Your answers were perfect!
Positive
thank you
Positive
I am happy with the answers.
Positive
Thank you.
Positive
thank you
Positive
thank you
Positive
thank you
Positive
thank you
Positive
Worked out the problems quickly and correctly.

Customer Question

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. 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 •Suppose an algorithm that processes a data set of size 8 has a runtime of 72, and the same algorithm on a data set of size 20 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.

 

Optional Information:
Level/Year: University
Subject: Discrete Matha

Submitted: 752 days and 16 hours ago.
Category: Homework
Value: $28
Status: CLOSED
Picture
Expert:  RRJha replied 752 days and 13 hours ago.

Hi,
Welcome to Justanswer!

The last question seems incomplete. Please let me know the whole of it.

Customer replied 752 days and 3 hours ago.

There are several parts to the assignment but I'm not sure that parts 1-4 will help with part 5. If you are willing to answer part 2 as well as part 5 let me know and I will pay double. I hope this helps.

 

Task Background: A large part-but not all-of this assignment concerns a situation in which you are involved in the design of electronic card games. To do this effectively, a working knowledge of sets, relations, combinatorics, and probability is necessary.

Part I: 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

Part II: 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

Also include a primary key. What is the value of n in this n-ary relation?

Part III: Graphs and Trees

Create a tree that models the following scenario. A player decides to play a maximum of 5 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 possibilities of winning or losing, and how that affects whether a new play is made.

Part IV: 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.

 

 

Part V

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:

  • o A sequential search
  • o 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, and the same algorithm on a data set of size 20 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

 

Accepted Answer

Picture
Expert:  RRJha replied 752 days and 1 hours ago.

THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying 3 €.
If you've already paid for this answer, simply Login.

Expert TypeTutor
Category: Homework
Pos. Feedback: 99.7 %
Accepts: 2168
Answered: 3/19/2011

Experience: B.Tech

Ask this Expert a Question >
 
Tweet

18 Tutors are Online Right Now

Ask Your Question Now
Ask A Tutor
Type Your Homework Question Here...
characters left:

Top Homework Experts

See More Tutors

In The News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More
close
Find Expert answers related to your question.
Sign up using email
We will never post anything without your permission.
Already have an account? Sign in

Ask a Tutor

Get a Professional Answer. 100% Satisfaction Guaranteed.
225 Tutors are Online Now
Type Your Homework Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us
© 2003-2013 JustAnswer LLC