Here is a chance to improve your grade for MAE-10. The number of points extra that you get are not yet determined. But the harder the problem you solve the more points that you get. I have estimated the difficulty of the problems and posted it for your guidance.

Fall 2019 EXTRA CREDIT

Problem 1

Difficulty: Challenging

There once live a king who liked chess. He had a palace whose floor plan mimicked an 8x8 chessboard, with each of the 64 rooms having a door in each of its four walls. Originally, all the floors in all the rooms were painted white. Then the king ordered the flooors to be repainted so that they alternated like the squares of a chessboard. To do this, his painter had to walk through the palace repainting floors in ALL the rooms he visited. If he walked into a white room, he must repaint it black. If he walked into a black room, he must repainted white. The painter was allowed to exit the palace and reenter it at another door. What is the best way to execute the order? Namely, what is the path that painter should have to pain the least amount of times and have the chessboard pattern complete?

Write a MATLAB program that outputs the path of the painter, the current state of the color of the rooms, and count the number of paint jobs necessary to execute the order of the king. The person who figures out the smaller number of paint jobs, wins!

Fall 2018 EXTRA CREDIT

Problem 1

Difficulty: Challenging

Tom has built a random generator that is connected to a row of n light bulbs. Whenever the random generator is activated each of the n lights is turned on with the probability of 1/2, independently of its former state or the state of the other light bulbs.

While discussing with his friend Jerry how to use his generator, they invent two different games that they call the reciprocal games. Both games consist of n turns. Each turn is started by choosing a number k randomly between (and including) 1 and n, with equal probability of 1/n for each number, while the possible win for that turn is the reciprocal of k, that is 1/k.

In game A, Tom activates his random generator once in each turn. If the number of lights turned on is the same as the previously chosen number k, Jerry wins and gets 1/k, otherwise he will receive nothing for that turn. Jerry's expected win after playing the total game A consisting of n turns is called JA(n). For example JA(6)=0.39505208, rounded to 8 decimal places.

For each turn in game B, after k has been randomly selected, Tom keeps reactivating his random generator until exactly k lights are turned on. After that Jerry takes over and reactivates the random generator until he, too, has generated a pattern with exactly k lights turned on. If this pattern is identical to Tom's last pattern, Jerry wins and gets 1/k, otherwise he will receive nothing. Jerry's expected win after the total game B consisting of n turns is called JB(n). For example JB(6)=0.43333333, rounded to 8 decimal places.

Let S(m)= sum from n=1 to m of (JA(n)+JB(n)). For example S(6)=7.58932292, rounded to 8 decimal places.

Find S(12), S(1234), S(1234567) and S(123456789), rounded to 8 decimal places.

Fall 2017 EXTRA CREDIT

Problem 1

Difficulty: Challenging

Lbh tbg gb or rssvat xvqqvat zr. Gur Creeva cntrf jvyy uryc lbh svaq lbhe pnyyvat, ohg qb abg or qhcrq. Phg qbja gur jbbqf gurl or Reqbf. Grkg zr V NZ ZNXVAT PBAGNPG ng gur sbyybjvat ahzore:

nyoravm qbg rat qbg hpv qbg rqh sbejneq fynfu 314 qbg ugzy

Lbhe fbyhgvba zhfg vapyhqr ng yrnfg 3 shapgvbaf jevggra va ZNGYNO ol lbh: Gur EBG-13 rapelcgbe/qrpelcgbe, n shapgvba gung trarengrf Creeva ahzoref naq n shapgvba gung trarengrf Reqbf-Jbbqf ahzoref. Rznvy gurz gb zr nsgre lbh unir grkgrq zr. Rkgen perqvg vf tvira gb gur svefg crefba jub grkgf zr NAQ jub rznvyrq zr gur evtug pbqr.

Tbbq yhpx!

Hint 1. Hint 2.

Fall 2016 EXTRA CREDIT

Problem 1

Difficulty: Very Challenging

Consider the number 6. The divisors of 6 are: 1,2,3 and 6.

Every number from 1 up to and including 6 can be written as a sum of distinct divisors of 6: 1=1, 2=2, 3=1+2, 4=1+3, 5=2+3, 6=6.

A number n is called a practical number if every number from 1 up to and including n can be expressed as a sum of distinct divisors of n.

A pair of consecutive prime numbers with a difference of six is called a consecutive sexy pair (since "sex" is the Latin word for "six". This is a website for people of all ages. If you have a dirty mind read about number theory here). The first sexy pair is (5,11). The first consecutive sexy pair is (23, 29).

We may occasionally find a triple-pair, which means three consecutive sexy prime pairs, such that the second member of each pair is the first member of the next pair.

We shall call a number n such that :

an engineer paradise.

Your job is to find the first engineer paradise. Can you find the second engineer paradise? How about the third?

Fall 2015 EXTRA CREDIT

Problem 1

Difficulty: Challenging

A king is informed that one of his 1000 wine barrels has been poisoned. The poison is so potent that a miniscule amount of it, no matter how diluted, kills a person in exactly 30 days. The king is prepared to sacrifice 10 of his slaves to determine the poisoned barrel.Can this be done before a feast scheduled in 5 weeks? Can the king achieve his goal with just eight slaves?

Write a Matlab program with a strategy that the king should follow. The input to the program will be a vector of length 1000. Each position represents a barrel of wine. An entry of zero is a non-poisoned barrel. An entry of 1 represents the poisoned barrel. Your program should tell the king what to do. The program announces the deaths of slaves. Exmaple:

Day 1: Give barrel 1 to slave 1
Day 1: Give mixture of barrels 1 and 2 to slave 2
Day 2: Give mixture of barrels 500 to 1000 to slave 3
...
Day 31: Announcement slave 1 is alive 
Day 31: Announcement slave 2 is dead

Result: Your magesty barrel number 2 is the one with the poison.

Fall 2014 EXTRA CREDIT

Problem 1

Difficulty: Challenging

Write a Matlab program that asks the user for the number of hands to be used in a simmulated Blackjack game. We call this number N. For our purporses there are no splits (when the player gets a pair and plays 2 hands). Also, when the player and the dealer get the same number, the outcome is a draw. The player and dealer have to take hits until his or her cards total 17 or more points. Assume an infite deck of cards.

For each case run the simmulation N times. You are to compute the probability that the player wins. Your program should create a text file called out.txt using the EXACT format shown here. The left column is the hand of the player. The other columns represent the card of the dealer facing up.

No partial credit given. Your solution must be perfect to get credit. It must run in Octave. Solution is due at 9:59 AM the day of our last lecture.

Fall 2013 & Spring 2014 EXTRA CREDIT

Problem 1

Difficulty: Challenging

In chess, a queen can move as far as she pleases, horizontally, vertically, or diagonally. Write a computer program that figures out ALL the possible solutions of placing 8 queens on an ordinary chess board so that none of them can hit one another in one move.

Extra-extra credit. Repeat the problem but this time use a board that is 22 x 22 squares, and place 22 queens there.

Spring 2013 EXTRA CREDIT

Problem 1

Difficulty: Challenging

There are six knights on a 3 x 4 chessboard: the three white knights are at the bottom row, and the three black knights are at the top row. Exchange the knights to get the position shown on the right of the figure below in the minimum number of knight moves, not allowing more than one knight on a square at any time.

Spring 2012 EXTRA CREDIT

Problem 1

Difficulty: Challenging

A hexagonal tile with number 1 is surrounded by a ring of six hexagonal tiles, starting at "12 o'clock" and numbering the tiles 2 to 7 in an anti-clockwise direction. New rings are added in the same fashion, with the next rings being numbered 8 to 19, 20 to 37, 38 to 61, and so on. The diagram below shows the first three rings.

By finding the difference between tile n and each its six neighbours we shall define PD(n) to be the number of those differences which are prime.

For example, working clockwise around tile 8 the differences are 12, 29, 11, 6, 1, and 13. So PD(8) = 3.

In the same way, the differences around tile 17 are 1, 17, 16, 1, 11, and 10, hence PD(17) = 2.

It can be shown that the maximum value of PD(n) is 3. You do not need to provide the proof, but you might keep this fact in mind.

If all of the tiles for which PD(n) = 3 are listed in ascending order to form a sequence, the 10th tile would be 271.

Write a program that list the sequence for which PD(n)=3. The person that submits the longest list gets the extra credit. You should submit your MATLAB code, which should be able to compile and run in our server with no errors or warnings. In addition, you should submit a copy of your output. Submissions are accepted via email. Submissions close at 11:59 PM the day before our final exam. All the work should be your own. If you submit code not written by you 100% you immediately fail the class. This is a fun problem. Let's keep the competition clean

Note that if you do this problem in a clever way you do not need HUGE amounts of CPU time.