Java programming

 This program is like a game, take the original array as stacks of coins, and I need to add more coins in order to make the height of stacks be decreasing in each row. And the Solve function needs to print out the modified array and return the minimum number of coins that I need to add to the stacks to make it decrease in rows and columns. It should also be able to handle dynamic array.

The purpose of this assignment

#!/usr/bin/env python

# The purpose of this assignment is to:

# * Learn how to construct a medium-sized program

# * Learn how a large problem may be broken into a series of small problems using bottom-up modularization

# * Learn how to solve a Sudoku without really trying

# ## Definition of a Sudoku

# A sudoku puzzle is a popular logic puzzle commonly found in newspapers and puzzle books.  The puzzle is given as a 9×9 grid with the numbers 1 through 9 entered in it.  Throughout this lab, we will take “0” to mean a “blank cell”.  The objective of the puzzle is to fill in all the blank cells with numbers between 1 and 9.  A typical sudoku puzzle looks like this:

# 0 0 7  || 0 0 0  || 0 1 5

# 0 0 0  || 3 9 7  || 0 0 0

# 0 6 2  || 0 1 0  || 4 0 9

# ===============

# 0 2 0  || 0 0 1  || 5 4 3

# 7 0 0  || 4 0 9  || 0 0 1

# 4 8 1  || 2 0 0  || 0 6 0

# ===============

# 9 0 6  || 0 2 0  || 7 3 0

# 0 0 0  || 9 8 4  || 0 0 0

# 1 5 0  || 0 0 0  || 2 0 0

# There are three rules about what numbers are allowed to go in any particular cell. 

# 1) Numbers are not allowed to occur more than once in any horizontal row 

# 2) Numbers are not allowed to occur more than once in any vertical column 

# 3) Numbers are not allowed to occur more than once in any of the nine smaller squares (here indicated by lines)

# Another way of saying this is that a number may only appear once in any row, column, or sub-square.  

# Over the course of this lab we will construct an algorithm which will solve sudoku problems automatically.  

# ## How we will encode a Sudoku Puzzle in Python

# For the purposes of this algorithm, we will define a sudoku puzzle as a two dimensional list, as follows.  Every element of s is a list containing nine elements, which correspond to each cell in that row.  When any function in this lab specifies a sudoku puzzle as an input, you may expect it in this format.

Discussion

explore the peer-reviewed literature and complete a 1 – page paper on the following topic: 

  • Network controller  for 3G/4G/5G mobile and wireless networks

IMPACT OF IT-6

 

Chapter 10

Subaru’s Sales Boom Thanks to the Weaker Yen For the Japanese carmaker Subaru, a sharp fall in the value of yen against the U.S. dollar has turned a problem—the lack of U.S. production—into an unexpected sales boom. Subaru, which is a niche player in the global auto industry, has long bucked the trend among its Japanese rivals of establishing significant manufacturing facilities in the North American market. Instead, the company has chosen to concentrate most of its manufacturing in Japan in order to achieve economies of scale at its home plants, exporting its production to the United States. Subaru still makes 80 percent of its vehicles at home, compared with 21 percent for Honda. Back in 2012, this strategy was viewed as something of a liability. In those days, one U.S. dollar bought only 80 Japanese yen. The strong yen meant that Subaru cars were being priced out of the U.S. market. Japanese companies like Honda and Toyota, which had substantial production in the United States, gained business at Subaru’s expense. But from 2012 onward, with Japan mired in recession and consumer prices falling, the country’s central bank repeatedly cut interest rates in an attempt to stimulate the economy. As interest rates fell in Japan, investors moved money out of the country, selling yen and buying the U.S. dollar. They used those dollars to invest in U.S. stocks and bonds where they anticipated a greater return. As a consequence, the price of yen in terms of dollars fell. By December 2015, one dollar bought 120 yen, representing a 50 percent fall in the value of the yen against the U.S. dollar since 2012.    For Subaru, the depreciation in the value of the yen has given it a pricing advantage and driven a sales boom. Demand for Subaru cars in the United States has been so strong that the automaker has been struggling to keep up. The profits of Subaru’s parent company, Fuji Heavy Industries, have surged. In February 2015, Fuji announced that it would earn record operating profits of around ¥410 billion ($3.5 billion) for the financial year ending March 2015. Subaru’s profit margin has increased to 14.4 percent, compared with 5.6 percent for Honda, a company that is heavily dependent on U.S. production. The good times continued in 2015, with Subaru posting record profits in the quarter ending December 31, 2015. Despite its current pricing advantage, Subaru is moving to increase its U.S. production. It plans to expand its sole plant in the United States, in Indiana, by March 2017, with a goal of making 310,000 a year, up from 200,000 currently. When asked why it is doing this, Subaru’s management notes that the yen will not stay weak against the dollar forever, and it is wise to expand local production as a hedge against future increases in the value of the yen. Indeed, when the Bank of Japan decided to set a key interest rate below zero in early February 2016, the yen started to appreciate against the U.S. dollar, presumably on expectations that negative interest rates would finally help stimulate Japan’s sluggish economy. By late March 2016, the yen had appreciated against the dollar and was trading at $1=112 yen. Sources: Chang-Ran Kim, “Subaru-Maker, Fuji Heavy Lifts Profit View on Rosy US Sales, Weak Yen,” Reuters, February 3, 2015; Yoko Kubota, “Why Subaru’s Profit Is Surging,” The Wall Street Journal, November 14, 2014; Doron Levin, “Subaru Profit Soaring on Weaker Yen,” Market Watch, November 15, 2014; Y. Kubato, “Weaker Yen Drives Subaru Maker’s Profit Higher,” The Wall Street Journal, February 4, 2016. Page 294 Case

Questions

 Why do you think that historically, Subaru chose to export production from Japan, rather than set up manufacturing facilities in the United States like its Japanese rivals? 

What are the currency risks associated with Subaru’s export strategy?

 What are the potential benefits?  Why did Subaru’s sales and profits surge in 2014 and 2015? Is Subaru wise to expand its U.S. production capacity?

What other strategies could the company use to hedge against adverse changes in exchange rates? What are the pros and cons of the different hedging strategies Subaru might adopt? 

PreviousNext
 

regression problem for predicting the demand of bike-sharing services in Washington D.C

 

We consider a regression problem for predicting the demand of bike-sharing services in Washington D.C.1 The prediction task is to predict the demand for the bikes (column cnt) given the other features: ignore the columns instant and dteday. Use the day.csv file from the data folder. (a) Write a Python file to load day.csv.2 Compute the correlation coefficient of each feature with the response (i.e., cnt). Include a table with the correlation coefficient of each feature with the response. Which features are positively correlated (i.e., have positive corre- lation coefficient) with the response? Which feature has the highest positive correlation with the response? (b) Were you able to find any features with a negative correlation coefficient with the response? If not, can you think of a feature that is not provided in the dataset but may have a negative correlation coefficient with the response? (c) Now, divide the data into training and test sets with the training set having about 70 percent of the data. Import train_test_split from sklearn to perform this operation. Use an existing package to train a multiple linear regression model on the training set using all the features (except the ones excluded above). Report the coefficients of the linear regression models and the following metrics on the training data: (1) RMSE metric; (2) R2 metric. [Hint: You may find the libraries sklearn.linear_model.LinearRegression useful.] (d)  Next, use the test set that was generated in the earlier step. Evaluate the trained model in step (c) on the testing set. Report the RMSE and R2 metrics on the testing set. (e)  Interpret the results in your own words. Which features contribute mostly to the linear regression model? Is the model fitting the data well? How large is the model error? 

 1https://www.kaggle.com/datasets/marklvl/bike-sharing-dataset?search=bike+demand+Washington& select=Readme.txt. You can also find a Readme.txt file that explains all the features in the dataset. 2Refer to https://docs.python.org/3/library/csv.html on how to load a csv file in Python. 

System Performance

 

See the website below:

https://www.passmark.com/products/pt.htm

This site has free benchmarking software that you can download and run against your computer…download the software and let it run against your system…run both the Standard AND the Advanced Test…

NOTE: THE ABOVE LINK IS FOR WINDOWS TESTING…PLEASE SEE THE FOLLOWING WEBSITES FOR SOME PERFORMANCE TESTING SOFTWARE FOR THE MAC…IF YOU ARE A MAC USER AND ALREADY HAVE A PERFORMANCE MEASURE SOFTWARE, YOU MAY USE IT…

https://browser.geekbench.com/mac-benchmarks

https://www.macworld.co.uk/how-to/mac/test-mac-speed-3654776/

So how did your system do?…what was your overall score and percentile?…what are the scores telling you?…were you surprised by the results?…do the benchmarks provided sync up with how you feel your system is performing?…provide some screen shots of the results…what takeaways do you have from this test?…any follow-ups?…how can you improve the performance of your laptop?…do you use any other performance testing software?…if so, which ones?…how do the results compare?…provide screen shots of the other performance monitoring software…