Algorithm for taking out heavier marbles

Assignment Help Basic Computer Science
Reference no: EM13829413

Problem:

You have eight marbles and a two-pan balance. All the marbles weigh the same, except for one, which is heavier than all the others. The marbles are otherwise indistinguishable. You may make no assumptions about how much heavier the heavy marble is.

(a) Describe an algorithm that finds the heavy marble in three weighings.

(b) Describe an algorithm that finds the heavy marble in two weighings.

Hints: Apply the binary search-based strategy.

To solve part (b), it might be helpful to consider first the problem with nine marbles.

Additional Information:

The question belongs to Computer Science and it discusses about two algorithms on marbles.

Total Word Limit: 251 Words

Reference no: EM13829413

Questions Cloud

Scenario of tampering and manipulating http : Devise a scenario of tampering and manipulating HTTP requests and responses to and from this HTTP Sandbox web site using Fiddler, collect the results you received, and document your work. Your documented work must include:
Ways succession planning helps your business : Ways Succession Planning Helps Your Business
An underwritten offering or best-efforts offering : Which do you think is more risky for a firm trying to raise capital - an underwritten offering or a best-efforts offering?
What is current value of share of simtek stock to investor : Simtek currently pays a $2.50 dividend (D0) per share. Next year’s dividend is expected to be $3 per share. After next year, dividends are expected to increase at a 9 percent annual rate for 3 years and a 6 percent annual rate thereafter. What is the..
Algorithm for taking out heavier marbles : You have eight marbles and a two-pan balance. All the marbles weigh the same, except for one, which is heavier than all the others. The marbles are otherwise indistinguishable.
Identify a few core values for effective facilitators : Identify a few "core values" for effective facilitators. which ones are "most" important to you and your organization
Scenario analysis: fmp : Scenario Analysis: FMP
Explains about the algorithm insertionsort : The insertion sort algorithm is stated below. Operation of insertion sort can be described as follows. The list at any moment is divided into two parts: sorted and unsorted. In each pass of the algorithm, the first element of the unsorted sub-list..
When should the organisers recognize revenue : Discuss the importance of Cost of Goods Sold(COGS) in this case - Let us say that the signatories will get a fixed fee for the effort, when would the organisers recognize the expense?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain type of impact of bi software on businesses

Visit website of the vendor of your choice and research their BI (Business Intelligence) capabilities. Report to the class on your findings. What type of impact do you think the BI software you researched will have on businesses that make use of it..

  Write subroutine in marie assembly that multiplies two value

Write a subtoutine in MARIE assembly that multiplies two values where the arguments for this subroutine are two pointers (each pointer pointing to a value). The routube, multiply (a,b), performs *a x *b where a's value is the address storing the valu..

  Own a consulting company that designs installs

Assume you own a consulting company that designs, installs, and maintains wide area networks. You currently have two companies requesting bids for their wide area networks to be installed. You must provide all of the relevant information to the..

  Recursive multiplication

Recursive Multiplication Write a main program that uses a recursive function. This function accepts two arguments into the parameters x and y.

  Dss projects

DSS projects succeed more often than they fail or are challenged.

  Create a high high-level data flow diagram

Create a high high-level data flow diagram describing the typical traditional methods of renewing a subscription via mail to the print version of a magazine in systems analysis and design methods.

  Case study of microsoft dynamics

For this assignment, you are to view the video case study "Evolution Homecare Manages Patients with Microsoft Dynamics CRM" located below and answer the following questions.

  Identifying and describing how information is used

Write a 700- to 1,050-word paper identifying and describing how information is used and how it flows in an organization.

  Why auditing is a cyclical process and it is never complete

Discuss why auditing is a cyclical process and it is never truly complete.

  Prepare the case budget for the fourth quarter

Using a spreadsheet to prepare the case budget for the fourth quarter. The cash budget should be included as an appendix to the written report and should be referenced in the written report.

  Organize the product development process for product

This system uses a high-resolution camera to inspect drug labels to ensure they contain the proper information to meet the ever evolving governmental standards. Your task is to organize the product development process for this revolutionary produc..

  Display the largest of a list of positive numbers

solve the problem by using raptor. Find and display the largest of a list of positive numbers entered by the users. The user should indicate that he/she has finished entering numbers by entering a 0.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd