Determine whether a Traffic Jam puzzle has a solution in k moves. If so, print out the list of moves that solve the puzzle. If not, print "No solution." Any strategy can be used as long as the program can at least detect when the search has cycled. A cycle is when the program encounters the same board layout more than once during a series of moves (example below). If a particular arrangement of cars has been encountered and has been processed, the next time that arrangement is encountered it should not be processed again. Solutions will likely use various data structures. I/O Details: The same input files will be used as the first project but this is not an interactive game. The program should print out the moves which will solve the game. For example, if the input file is:

Determine whether a Traffic Jam puzzle has a solution in k moves. If so, print out the list of moves that solve the puzzle. If not, print “No solution.”

Any strategy can be used as long as the program can at least detect when the search has cycled. A cycle is when the program encounters the same board layout more than once during a series of moves (example below). If a particular arrangement of cars has been encountered and has been processed, the next time that arrangement is encountered it should not be processed again.

Solutions will likely use various data structures. (more…)

Read More

What are some strategies (two or more) you use to effectively revise paragraphs? How did you first discover these strategies? What about these strategies do you find helpful? Are there any other strategies you're curious about, but have never tried? Give examples. Do you have any other advice about revision for your fellow classmates? Any questions about revision for them?

  • What are some strategies (two or more) you use to effectively revise paragraphs?
    • How did you first discover these strategies?
    • What about these strategies do you find helpful?
  • Are there any other strategies you’re curious about, but have never tried? Give examples.
  • Do you have any other advice about revision for your fellow classmates? Any questions about revision for them?

Read More

During early adulthood, people begin make important life decisions in three areas: career, family, and health. Young adults establish patterns of nutrition and physical activity that can have either positive or negative effects on their physical development in later stages of adulthood. They also begin to make decisions about what career path to follow. At some point during early adulthood, individuals also choose either to marry or remain single, and decide whether or not to start a family. Consider the following example: Jeff is 23 years old. He recently graduated from college with a business degree and took a managerial position with a midsize company. He likes his coworkers, but often finds himself bored with his work. Although he was active in college, recently he has gained about 10 pounds due to his sedentary job and lack of time to exercise. Jeff broke up with his college girlfriend after graduation, and since then he has dated a few different women, but hasn’t had another serious relationship. Jeff wonders what the remainder of his 20’s and his 30’s will bring. Based on your reading, prepare a PowerPoint presentation that would help individuals like Jeff set goals related to career, health, and family. The presentations should discuss the relationship between lifestyle choices and health risks. In addition, it should address how factors like personality and attachment may influence both career- and family-related goals. Finally, address diversity in the presentation. Explain how your plan could be adapted to fit the needs of different socioeconomic or ethnic groups.

Physical Development in Early Adulthood

During early adulthood, people begin make important life decisions in three areas: career, family, and health. Young adults establish patterns of nutrition and physical activity that can have either positive or negative effects on their physical development in later stages of adulthood. They also begin to make decisions about what career path to follow. At some point during early adulthood, individuals also choose either to marry or remain single, and decide whether or not to start a family. Consider the following example:

Jeff is 23 years old. He recently graduated from college with a business degree and took a managerial position with a midsize company. He likes his coworkers, but often finds himself bored with his work. Although he was active in college, recently he has gained about 10 pounds due to his sedentary job and lack (more…)

Read More

Write a method called swapSubtrees, which swaps all of the left and right subtrees in the given binary trees (see screenshot attached below). Add this method to the class Binary Tree and create a program to test this method for these 2 trees. Show the original trees and the resulting trees. Note: To test the algorithm, first create a binary search tree.

 Write a method called swapSubtrees, which swaps all of the left and right subtrees in the given binary trees (see screenshot attached below). Add this method to the class Binary Tree and create a program to test this method for these 2 trees. Show the original trees and the resulting trees.

Note: To test the algorithm, first create a binary search tree.

Read More

To compare the battery life of Duracell versus Energizer batteries, a sample of 140 Duracell batteries lasted an average of 345 minutes with a standard deviation of 95 minutes and a sample of 125 Energizer batteries lasted an average of 280 minutes with a standard deviation of 86 minutes. a) At the 1% level of significance, test the hypothesis that Duracell batteries last at least 45 minutes longer on average than Energizer batteries? b) What is the p-value?

To compare the battery life of Duracell versus Energizer batteries, a sample of 140 Duracell batteries lasted an average of 345 minutes with a standard deviation of 95 minutes and a sample of 125 Energizer batteries lasted an average of 280 minutes with a standard deviation of 86 minutes.
a) At the 1% level of significance, test the hypothesis that Duracell batteries last at least 45 minutes longer on average than Energizer batteries?
b) What is the p-value?

Read More

A local supermarket spent $250,000 remodeling. Prior to remodeling, the average daily receipts were $57,500. In a sample of 18 days following the remodeling, daily receipts were $59,800 with a standard deviation of $5,460. At the 10% significance level, what can you conclude as to whether the remodeling improved daily receipts?

A local supermarket spent $250,000 remodeling. Prior to remodeling, the average daily receipts were $57,500. In a sample of 18 days following the remodeling, daily receipts were $59,800 with a standard deviation of $5,460. At the 10% significance level, what can you conclude as to whether the remodeling improved daily receipts?

Read More

In past years the mean IQ of enlisted men in the Army was 103. A general claims that due to low pay, the average IQ of new enlisted men is lower than in the past. In a random sample of 60 enlistees, the mean IQ was 98 with a standard deviation of 20. a) At the 8% significance level, what can be concluded about general’s claim? b) What is the p-value of this test?

In past years the mean IQ of enlisted men in the Army was 103. A general claims that due to low pay, the average IQ of new enlisted men is lower than in the past. In a random sample of 60 enlistees, the mean IQ was 98 with a standard deviation of 20. a) At the 8% significance level, what can be concluded about general’s claim?
b) What is the p-value of this test?

Read More