# Tutor profile: Miguel S.

## Questions

### Subject: Java Programming

Within the java.utils package, there are 3 main sub-interfaces that extend the Collection interface, all of which are used for storing data in memory. What are they and how do they differ in how they manage data?

The 3 main sub-interfaces are Lists, Sets, and Maps. A list is an ordered, by order of input or by a sort, collection of elements and can include duplicates A set, like a mathematical set, is a collected, but not necessarily an ordered collection, of non repeating elements A map is a collection of key-value pairs with no repeating keys but possibly repeating values. In a map, the values are the elements to be stored

### Subject: Writing

When writing, withholding information or being vague can be viewed as poor writing but can also be used leave gaps for the reader to fill. This is called inference and cases in finctional writing that utilize few words but convey a lot of information is a style called flash fiction. This style was a popular style used by Earnest Hemingway who has been repeatedly mis-cited for having written the "shortest saddest story ever" which goes: $$FOR \enspace SALE:\\BABY \enspace SHOES\\NEVER \enspace WORN$$ What is this short story trying to make the reader infer? Or rather, what do you think the story trying to tell you without saying it out loud. Also, notice the set up to the story. Does that play a hand in what you're expected to infer? What else can this story try to infer?

The shortest saddest story ever is written with the goal to make you infer that some expecting parent purchased shoes for their child-to-be-born but the shoes were never worn because the child died before they ever got to wear it. The set up for the story, such as referring to it as the shortest saddest story ever told, does play into how we infer the story's meaning. Without referencing it as sad, the story may no necessarily mean that a child died. It could mean that the parent forgot about the shoes only to find them when the child was to big to fit into them, or someone having bought a pair of new baby shoes for someone else's child, found a better present and decided to sell the shoes. In this way, the setup is part of the story because it sets the tone.

### Subject: Algebra

Say you are in the first infinite tower in the world. A marvel of technology, the building has infinite floors to explore and you are on the ground floor (floor 0). You have the option of riding the elevator or climbing the stairs. The elevator, which never starts on the floor you're on, always takes 6 minutes to arrive to your floor to collect you and then takes 1 minute per floor to your destination floor. However, you, an excellent stair climber, doesn't have to wait to start climbing and can climb up a floor in 1.5 minutes up to the 3rd floor but then you begin to slow down linearly by a rate of 0.25 minutes per floor thereafter assuming you don't stop. Your job: First: find a linear equation that models the elevator's behavior as a function of time over floors going up from the ground floor (floor 0) Second: find a piece-wise function that models your climbing behavior as a function of time over floors going up from the ground floor (floor 0) Third: at which floor would riding the elevator start to take as much or less time than climbing the stairs starting from the ground floor (floor 0)?

Since all questions as for a function of time over floors, our $$x$$-axis is floors traveled and our $$y$$-axis is the time needed to reach that floor. For the first part, we can use the slope-intercept formula $$y=mx+b$$ to model the elevator. To use this equation we need to find the slope and the $$y$$-intercept, or at what time we start traveling from the ground floor. First we find our slope $$m$$ where $$m = 1$$ because the elevator takes 1 minute per floor. Since we start any elevator trip waiting 6 minutes to be picked up, every elevator trip at the ground floor starts at point $$(x,y)=(0,6)$$, or floor 0 until minute 6. Our equation for part 1 thus is $$y=x+6$$. The second part, we are required to do a piece wise function to model our climbing capabilities. Within the problem, we have two parts to this behavior: 1.5 minutes per floor up to the first three floors 1.5 minutes per floor plus 0.25 minutes per floor after the first three Thus we can build two linear functions from which to build our piece-wise function from. In both cases we can build an equation using the slope-intercept form. Since we can start climbing right away at minute 0 from floor 0, our $$y$$-intercept is at the origin $$(0,0)$$ for both equations. As for our slope, let's work at this one at a time. In the first case, we can go up 1 floor in 1.5 minutes so our slope $$m=1.5$$ making our full equation $$y=1.5x$$. Our piece-wise condition here is that this equation only works up to the first three floors including the third floor starting at the ground floor. Our condition can then be written as $$0 \leq x \leq 3$$. The second part isn't as difficult as it may seem. We can actually modify the first equation to get the get the second. The second part stipulates that we continue going with an additional 0.25 minutes per floor but only after the third so being on the third floor does not incur this additional rate but being on the fourth and beyond does. This rate can be modeled by $$0.25(x-3)$$. We can simply tack this rate on to our first equation giving us $$1.5x+0.25(x-3)$$. Further simplified, $$1.5x+0.25(x-3)=1.5x+0.25x-0.25*3=1.75x-0.75$$ which is our final equation. Our condition can also be built upon the last equation's conditional where we can only use this equation after the third floor. Thus our conditional is $$x>3$$. Our full piece-wise function then is: $$y=\begin{cases} 1.5x & 0 \leq x\leq 3 \\ 1.75x-0.75 & x>3 \end{cases}$$ Finally, the last part. Here, we want to compare the equations in our piece-wise function to our elevator function. Doing this is rather simple as we just have to plug in one of our piece-wise functions as the $$y$$ of our elevator function. The choice of which piece-wise function to use is rather easy since the first function can only go as high as the first floor. So we plug in 3 for our $$x$$ to get $$1.5(3) = 4.5$$ from our piece-wise and $$1(3)+6=9$$ for our elevator so using the first piece-wise funtion is out of the question. So instead we use the second piece-wise function and set it up like so: $$ 1.75x-0.75 = x+6$$. From here we can solve it using the following steps: Add $$0.75$$ to both sides: $$1.75x-0.75+0.75 = x+6+0.75\\1.75x=x+6.75$$ Subtract $$1x$$ from both sides: $$1.75x-x = x+6.75-x\\0.75x=6.75$$ and finally divide $$0.75$$ from both sides: $$\frac{0.75x}{0.75}=\frac{6.75}{0.75}\\x=9$$ Thus, from the 9th floor and above, riding the elevator takes the same or less time than climbing the stairs.

## Contact tutor

needs and Miguel will reply soon.