Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help please will thumbs up The solution solution def balanced_centrif uge [ n, k] : This problem was inspired by yet another Numberphile video, this

help please will thumbs up

image text in transcribed
The solution solution def balanced_centrif uge [ n, k] : This problem was inspired by yet another Numberphile video, this time "The gentrifugg Problem" that you can watch to get an idea what this problem is about, especially since the lovely Dr. Krieger seems a Far better lecturer than this grumpy instructor in most ways that matter. (Despite the chemical inspiration behind this problem, its solulion is not an overly alkaline pH balance.} Those who read faster than they listen can alternatively consult the blog post "We Problem" by Matt Baker. A centrifuge has n identical slots arranged in a rotaling circle. For safe operation of this fast spinning machine, the identical test tubes must be placed on these slots so that their mutual center of gravity lies exactly on the center of the centrifuge. This turns out to be possible for 1: test tubes precisely when both quantities k and 11-]: can somehow be expressed as sums of prime factors of n. For example. when )1 equals 6 so that its prime factors are 2 and 3, it is possible to load the centrifuge safely with 2, 3, 4 or 6 test tubes. [When 1: equals n, the quantity nk equals zero that is always expressible as the empty sum. regardless of the prime factors of 11.} However, there is no way to safely balance one or ve test tubes into six slots; even though 5 = 2 + 3, there is no way to counterbalance the empty slot without making the entire machine wobble dangerously. (Nope, one is still not a prime number, and therefore not a prime factor eithen} This function does not actually need to construct the balanced conguration of test tubes, but simply determine whether some balanced conguration exists at all

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

+How useful are they to marketers?

Answered: 1 week ago