Robots Slice Apples?

Robots are used to prepare bags of sliced apples. One particularly bad robot gets tired as his power starts to run low, so making the k k th bag takes the robot k + 4 k+4 actions.

For example, the robot can make the 1st bag with just 5 actions, but by the 100th bag, it takes the robot 104 actions. The total number of actions needed to make n n bags of sliced apples (for large n n ) is:

Θ ( n 4 ) \Theta(n^4) Θ ( n ) \Theta(n) Θ ( n 3 ) \Theta(n^3) Θ ( n 2 ) \Theta(n^2)

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Eli Ross Staff
Oct 29, 2015

In total, n n bags will take ( 1 + 4 ) + ( 2 + 4 ) + ( 3 + 4 ) + + ( n + 4 ) (1+4)+(2+4)+(3+4)+\ldots+(n+4) actions by the robot. We can take out the n n copies of 4, and see that this is 4 n + ( 1 + 2 + 3 + + n ) 4n + (1+2+3+\ldots+n) actions by the robot. Since 1 + 2 + 3 + + n = n ( n + 1 ) 2 n 2 2 1+2+3+\ldots+n = \frac{n(n+1)}{2} \approx \frac{n^2}{2} , the robot uses 4 n + 1 2 n 2 = Θ ( n 2 ) \approx 4n+\frac{1}{2}n^2 = \Theta (n^2) actions.

It probably wouldn't be a bad idea to explicitly define the theta function (maybe its not a function, i have no idea) . I had no idea what any of the answers meant but I could have easily found a function for the number of cuts.

McKay Holmes - 5 years, 6 months ago

Log in to reply

I agree with Mckay.

Ethan Sharp - 5 years, 3 months ago

Log in to reply

I found the actions to cuts or whatever confusing. I had nothing to work with except 2 seemingly Un related variables

Alex Williams - 5 years, 1 month ago

This idea is called big O notation, and deals with the complexity of different algorithms. How long it takes to process basically.

Hope Haugstad - 4 years, 6 months ago

Log in to reply

It would be useful if there was a lesson first and then the questions! At the moment this app isn't teaching much, just testing what you already know.

Christian Morgan - 3 years, 11 months ago

Log in to reply

Yeah, I definitely agree there...

RandomInkknight III - 2 years, 10 months ago

What's the symbol that looks like an O called

Katie Chen - 4 years, 7 months ago

Log in to reply

Capital (or "big") theta

Victoria Vasys - 4 years, 6 months ago

https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/

Emily Falces - 3 years, 2 months ago

You can't factor out 4n, but you can factor out 4. Other than that, Eli's explanation w/ (1+2+3+...+n) approx (n^2/2) is good.

Caleb Kelley - 2 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...