Questions
Write a function in Matlab that takes as input the number n and a symmetric tridiagonal...

Write a function in Matlab that takes as input the number n and a symmetric tridiagonal matrix given as two vectors: n×1 vector v representing the main diagonal and (n−1)×1 vector w representing the upper diagonal. Have this function output the Cholesky factor of the matrix as a vector for the main diagonal and a vector for the upper diagonal and output the number of flops and, separately, the number of square roots used as well. Use only basic programming.

(a) Write out or print out your function.

(b) Run the case with v =2*ones(10,1), w = -ones(9,1) and write out or print out all your results.

(c) Rune the case with v =2*ones(100,1), w =-ones(99,1) and write out or print out your results just for the number of flops and square roots used. How many times more flops are used than in the previous case?

In: Computer Science

c = 3.0 x 108 m/s;        b = v/c;           g (gamma) = 1/sqrt[1 – b2];    u...

c = 3.0 x 108 m/s;        b = v/c;           g (gamma) = 1/sqrt[1 – b2];    u = (u’ + v) / (1 + u’v/c2);

Eph = hf = hc/l;           P = esAT4;     s = 5.67 x 10-8 Watts / m2 / K4

1. Relativistic Factor. Calculate the value of the relativistic factor g for an object traveling at v = 0.999c.

2. E = mc2. If precisely 1.00 kilogram of mass could be converted completely into energy, for how long could this amount of energy keep a 100-Watt light bulb shining? (Assume the bulb can operate for a very long time.)

3. Velocity Addition. A relativistic craft traveling at 0.6c w/r/t to the Earth launches a probe, which travels at a velocity of 0.8c w/r/t the craft. What is the velocity of the probe w/r/t the Earth? (It’s not 1.4c.)

In: Physics

Part A - Palindromic Bitlists Write a function palindrome binary(n) which returns a list of bitlists...

Part A - Palindromic Bitlists Write a function palindrome binary(n) which returns a list of bitlists of length n, where every bitlist is a palindrome. The returned list of bitlists must be in lexicographical order (think about the order of your options). You must use backtracking to solve this problem (i.e. do not use brute force).

Part B - All Paths Write a function all paths(M, u, v) which takes as input an adjacency matrix of a graph, M, and two vertices u, v and returns a list of all paths from u to v in M. A path is a list of vertices. Note that a path cannot use the same vertex twice, but two different paths can use some of the same vertices. The returned list of paths must be in lexicographical order. You must use backtracking to solve this problem (i.e. do not use brute force).

PYTHON CODE

In: Computer Science

1. Star with Newton's third law: dp/dt = ΣF where p is the momentum. In space,...

1. Star with Newton's third law: dp/dt = ΣF where p is the momentum. In space, the sum of the external forces ΣF = 0. For a rocket in space, the mass and velocity change with time as the rocket expends its fuel. Show from Newton's third law that ΔV = v ln(m/M) where m is the initial mass of the rocket, M is the final mass of the rocket after the fuel is expended, v is the rocket's exhaust velocity and ΔV is the change in the velocity for the rocket

2. Now, the rocket needs to get to escape velocity to get to the moon. Use conservation of energy to derive an expression for the escape velocity. If we start at 200km above the surface of earth, calculate the ΔV we need to escape from Earth and get to the moon.

3. Finally, use the earlier Rocket Equation calculate the fraction of the initial rocket's mass that is dedicated to fuel to make the journey from the Earth to the Moon. In this case, v is 4500 m/s.

In: Physics

Note: This problem is for the 2018 tax year. Lance H. and Wanda B. Dean are...

Note: This problem is for the 2018 tax year.

Lance H. and Wanda B. Dean are married and live at 431 Yucca Drive, Santa Fe, NM 87501. Lance works for the convention bureau of the local Chamber of Commerce, while Wanda is employed part-time as a paralegal for a law firm.

During 2018, the Deans had the following receipts:

Salaries ($60,000 for Lance, $41,000 for Wanda) $101,000
Interest income—
   City of Albuquerque general purpose bonds $1,000
   Ford Motor company bonds 1,100
   Ally Bank certificate of deposit 400 2,500
Child support payments from John Allen 7,200
Annual gifts from parents 26,000
Settlement from Roadrunner Touring Company 90,000
Lottery winnings 600
Federal income tax refund (for tax year 2017) 400

Wanda was previously married to John Allen. When they divorced several years ago, Wanda was awarded custody of their two children, Penny and Kyle. (Note: Wanda has never issued a Form 8332 waiver.) Under the divorce decree, John was obligated to pay alimony and child support—the alimony payments were to terminate if Wanda remarried.

In July, while going to lunch in downtown Santa Fe, Wanda was injured by a tour bus. As the driver was clearly at fault, the owner of the bus, Roadrunner Touring Company, paid her medical expenses (including a one-week stay in a hospital). To avoid a lawsuit, Roadrunner also transferred $90,000 to her in settlement of the personal injuries she sustained.

The Deans had the following expenditures for 2018:

Medical expenses (not covered by insurance) $7,200
Taxes—
   Property taxes on personal residence $3,600
   State of New Mexico income tax (includes amount withheld
       from wages during 2018) 4,200 7,800
Interest on home mortgage (First National Bank) 6,000
Charitable contributions 3,600
Life insurance premiums (policy on Lance's life) 1,200
Contribution to traditional IRA (on Wanda's behalf) 5,000
Traffic fines 300
Contribution to the reelection campaign fund of the mayor of Santa Fe 500
Funeral expenses for Wayne Boyle 6,300

The life insurance policy was taken out by Lance several years ago and designates Wanda as the beneficiary. As a part-time employee, Wanda is excluded from coverage under her employer's pension plan. Consequently, she provides for her own retirement with a traditional IRA obtained at a local trust company. Because the mayor is a member of the local Chamber of Commerce, Lance felt compelled to make the political contribution.

The Deans' household includes the following, for whom they provide more than half of the support:

Social Security Number Birth Date
Lance Dean (age 42) 123-45-6786 12/16/1976
Wanda Dean (age 40) 123-45-6787 08/08/1978
Penny Allen (age 19) 123-45-6788 10/09/1999
Kyle Allen (age 16) 123-45-6789 05/03/2002
Wayne Boyle (age 75) 123-45-6785 06/15/1943

Penny graduated from high school on May 9, 2018, and is undecided about college. During 2018, she earned $8,500 (placed in a savings account) playing a harp in the lobby of a local hotel. Wayne is Wanda's widower father who died on January 20, 2018. For the past few years, Wayne qualified as a dependent of the Deans.

Federal income tax withheld is $5,200 (Lance) and $2,100 (Wanda). The proper amount of Social Security and Medicare tax was withheld.

Required:

Determine the Federal income tax for 2018 for the Deans on a joint return by providing the following information that would appear on Form 1040 and Schedule A. They do not want to contribute to the Presidential Election Campaign Fund. All members of the family had health care coverage for all of 2018. If an overpayment results, it is to be refunded to them.

In: Accounting

In C++ Modify the program #1 to allow the user to enter name-score pairs. For each...

In C++

Modify the program #1 to allow the user to enter name-score pairs. For each student taking a test, the user types a string representing the name of the student, followed by an integer representing the student's score. (use a structure) Modify the average-calculating function so they take arrays of structures, with each structure containing the name and score of a single student. In traversing the arrays, use pointers notation rather than array indices. (myArray->name or *(myArray).name) Make it a class.  You will need a destructor because you are using dynamic arrays.

I need your help! This is fundamental II. Thank you

In: Computer Science

c# only please Objectives Use the more advanced data structures introduced to accomplish a difficult problem....

c# only please

Objectives

  • Use the more advanced data structures introduced to accomplish a difficult problem.

Tasks

This assignment has two parts:

  1. Read from a file.
  2. Write to a file.

Task 1 – File Input

The first piece of information we need is a text file’s name and location. Ask the user through the console what the file’s name and location are. After that, please ensure that the file does exist and at the given location. If the file does not exist or cannot be read, please return a message to the user stating that and ask them to enter another name and location.

Finally, if the file can be read then simply copy/read every line from the file. The contents of this file will be used in the next task.

Task 2 – File Output

Ask the user, through the console, what the name of the copy of the previous file should be called and where it should be saved. Check to see if a file with the same name already exists at the location given and if one does ask the user if they want to overwrite the file that already exists or if they would like to change the name and location of the new file. If they wish to change the name and location, go through the process of getting their input again through the console and checking if the newly given name and location are taken already too.

If they want to overwrite or no file already exists in the given location with the given name, then place the copied contents of the file that was read in the first task into this new file.

After successfully copying the contents of the first file into the second file, print to the console the name and location of both of those files.

A sample text file named “textfile.txt” has been supplied in case you need a file to test the above code on. The contents of that file is the declaration of independence.

∃ Some Sample Output:

Please enter a text file name and location:

C:\Users\source\repos\1322L_Assignment6\bin\Debug\textfiladsfe.txt22

This file does not exist!

Please enter a text file name and location:

C:\Users\source\repos\1322L_Assignment6\bin\Debug\textfile.txt

Please enter a new file name and location:

C:\Users\source\repos\1322L_Assignment6\bin\Debug\DeclarationOfIndependence.txt

A file already exists with that name!

Would you like to overwrite it or enter a different name? (0 or 1) 0

The file will be overwritten.

The file “C:\Users\source\repos\1322L_Assignment6\bin\Debug\textfile.txt” has been copied to “C:\Users\source\repos\1322L_Assignment6\bin\Debug\DeclarationOfIndependence.txt”.

In: Physics

Airbnb, a popular home-sharing website founded in San Francisco in 2008, offers millions of homes for...

Airbnb, a popular home-sharing website founded in San Francisco in 2008, offers millions of homes for
short-term rental in more than 190 countries. This company has revolutionized the sharing economy in
the same way that ride-sharing services such as Uber and Lyft have, and according to the company, the
site’s drive to connect hosts and potential renters has been able to contribute to the quality of life of
both homeowners and travelers. According to Airbnb’s press releases and information campaigns, their
services can reduce housing costs for travelers on a budget and can provide unique experiences for
adventurous travelers who wish to have the flexibility to experience a city like a local. The organization
also claims that most of its users are homeowners looking to supplement their incomes by renting out
rooms in their homes or by occasionally renting out their whole homes. According to a statement, most
of the listings on the site are rented out fewer than 50 nights per year.

Despite the carefully crafted messages Airbnb has presented to the public, in 2016 the company came
under intense scrutiny when independent analyses by researchers and journalists revealed something
startling: While some Airbnb hosts did in fact use the services only occasionally, a significant number of
hosts were using the services as though they were hotels. These hosts purchased a large number of
properties and continuously rented them, a practice that affected the availability of affordable housing in
cities and, because these hosts were not officially registered as hoteliers, made it possible for Airbnb
hosts to avoid paying the taxes and abiding by the laws that hotels are subject to.

Title II of the Civil Rights Act of 1964 mandates that hotels and other public accommodations must not
discriminate based on race, national origin, sex, or religion, and Title VIII of the Civil Rights Act of 1968
(also known as the Fair Housing Act [FHA]) prohibits discrimination specifically in housing. However,
Airbnb’s unique structure allows it to circumvent those laws. The company also claims that while it
encourages hosts to comply with local and federal laws, it is absolved from responsibility if any of its
hosts break these laws. In 2017, researcher Ben Edelman conducted a field experiment and found that
Airbnb users looking to rent homes were 16% less likely to have their requests to book accepted if they
had traditionally African American sounding names like Tamika, Darnell, and Rasheed.

These findings, coupled with a viral social media campaign, #AirbnbWhileBlack, in which users claimed
they were denied housing requests based on their race, prompted the state of California’s Department
of Fair Employment and Housing (DFEH) to file a complaint against the company. In an effort to resolve the complaint, Airbnb reported banning any hosts who were found to have engaged in discriminatory
practices, and they hired former U.S. Attorney General Eric Holder and former ACLU official Laura
Murphy to investigate any claims of discrimination within the company.31 In 2016, Airbnb released a
statement outlining changes to company practices and policies to combat discrimination, and while they
initially resisted demands by the DFEH to conduct an audit of their practices, the company eventually
agreed to an audit of roughly 6,000 of the hosts in California who have the highest volume of properties
listed on the site.

Sources: AirBnB Press Room, accessed December 24, 2018, https://press.atairbnb.com/about-us/;
“Airbnb's data shows that Airbnb helps the middle class. But does it?”, The Guardian, accessed December
23, 2018, https://www.theguardian.com/technology/2016/jul/27/airbnb-panel-democratic-nationalconvention-
survey ; and Quittner, Jeremy, “Airbnb and Discrimination: Why It’s All So Confusing”,
Fortune, June 23, 2016, http://fortune.com/2016/06/23/airbnb-discrimination-laws/ (Links to an external site.).

Discussion Questions
1. What are some efforts companies in the sharing economy can take before problems of
discrimination threaten to disrupt operations?
2. Should Airbnb be held responsible for discriminatory actions of its hosts?

In: Operations Management

Sun Corporation received a charter that authorized the issuance of 89,000 shares of $6 par common stock and 20,000 shares of $100 par, 8 percent cumulative preferred stock


Sun Corporation received a charter that authorized the issuance of 89,000 shares of $6 par common stock and 20,000 shares of $100 par, 8 percent cumulative preferred stock. Sun Corporation completed the following transactions during its first two years of operation:

2016

  Jan.

5

Sold 13,350 shares of the $6 par common stock for $8 per share.

 

12

Sold 2,000 shares of the 8 percent preferred stock for $110 per share.

  Apr.

5

Sold 17,800 shares of the $6 par common stock for $10 per share.

  Dec.

31

During the year, earned $312,400 in cash revenue and paid $241,500 for cash operating expenses.

 

31

Declared the cash dividend on the outstanding shares of preferred stock for 2016. The
dividend will be paid on February 15 to stockholders of record on January 10, 2017.

 

31

Closed the revenue, expense, and dividend accounts to the retained earnings account.

2017

  Feb.

15

Paid the cash dividend declared on December 31, 2016.

  Mar.

3

Sold 3,000 shares of the $100 par preferred stock for $120 per share.

  May

5

Purchased 550 shares of the common stock as treasury stock at $12 per share.

  Dec.

31

During the year, earned $251,000 in cash revenues and paid $174,000 for cash operating expenses.

 

31

Declared the annual dividend on the preferred stock and a $0.75 per share dividend on the common stock.

 

31

Closed revenue, expense, and dividend accounts to the retained earnings account.

b.

Prepare the balance sheets at December 31, 2016 and 2017. (Amounts to be deducted should be indicated with minus sign.)

   
   
   
 

SUN CORPORATION

Balance Sheet

As of December 31, 2016

Assets

   
     
     

Total assets

 

$0

Liabilities

   
     
     

Total liabilities

 

0

Stockholders’ equity

   
     
     
     
     
     
     

Total paid-in capital

0

 
     
     

Total stockholders’ equity

 

0

Total liabilities and stockholders’ equity

 

0

 
           
   
 

SUN CORPORATION

Balance Sheet

As of December 31, 2017

Assets

   
     
     

Total assets

 

$0

Liabilities

   
     
     

Total liabilities

 

0

Stockholders’ equity

   
     
     
     
     
     
     

Total paid-in capital

0

 
     
     

Total stockholders’ equity

 

0

Total liabilities and stockholders’ equity

 

0

c-1.

What is the number of common shares outstanding at the end of 2016? At the end of 2017? How many common shares had been issued at the end of 2016? At the end of 2017? (Amounts to be deducted should be indicated with minus sign.)

   
 

Schedule of Number of Shares of Common Stock

 

Shares Issued

Shares Outstanding

2016

   
     
     
     

Totals

0

0

2017

   
     
     

Totals

0

0

 
       

c-2.

Is any differences between issued and outstanding common shares for 2016 and for 2017.

   

          

   
 
   

Issued common shares

 

Outstanding common shares

 

In: Accounting

Required information Problem 17-2A Ratios, common-size statements, and trend percents LO P1, P2, P3 [The following...

Required information

Problem 17-2A Ratios, common-size statements, and trend percents LO P1, P2, P3

[The following information applies to the questions displayed below.]

Selected comparative financial statements of Korbin Company follow:

KORBIN COMPANY
Comparative Income Statements
For Years Ended December 31, 2017, 2016, and 2015
2017 2016 2015
Sales $ 480,784 $ 368,320 $ 255,600
Cost of goods sold 289,432 230,568 163,584
Gross profit 191,352 137,752 92,016
Selling expenses 68,271 50,828 33,739
Administrative expenses 43,271 32,412 21,215
Total expenses 111,542 83,240 54,954
Income before taxes 79,810 54,512 37,062
Income taxes 14,845 11,175 7,524
Net income $ 64,965 $ 43,337 $ 29,538


KORBIN COMPANY
Comparative Balance Sheets
December 31, 2017, 2016, and 2015
2017 2016 2015
Assets
Current assets $ 52,332 $ 40,943 $ 54,731
Long-term investments 0 800 3,770
Plant assets, net 97,187 103,446 61,788
Total assets $ 149,519 $ 145,189 $ 120,289
Liabilities and Equity
Current liabilities $ 21,830 $ 21,633 $ 21,051
Common stock 66,000 66,000 48,000
Other paid-in capital 8,250 8,250 5,333
Retained earnings 53,439 49,306 45,905
Total liabilities and equity $ 149,519 $ 145,189 $ 120,289

Problem 17-2A Part 1

Required:
1. Complete the below table to calculate each year's current ratio.

Current Ratio
Choose Numerator: / Choose Denominator: = Current ratio
/ = Current ratio
2017 / = to 1
2016 / = to 1
2015 / = to 1

2. Complete the below table to calculate income statement data in common-size percents. (Round your percentage answers to 2 decimal places.)

KORBIN COMPANY
Common-Size Comparative Income Statements
For Years Ended December 31, 2017, 2016, and 2015
2017 2016 2015
Sales % % %
Cost of goods sold -1 -1 -1
Gross profit
Selling expenses -1 -1 -1
Administrative expenses -1 -1 -1
Total expenses
Income before taxes -1 -1 -1
Income taxes -1 -1 -1
Net income % % %

3. Complete the below table to calculate the balance sheet data in trend percents with 2015 as the base year. (Round your percentage answers to 2 decimal places.)

KORBIN COMPANY
Balance Sheet Data in Trend Percents
December 31, 2017, 2016 and 2015
2017 2016 2015
Assets
Current assets % % 100.00 %
Long-term investments 100.00
Plant assets, net 100.00
Total assets % % 100.00 %
Liabilities and Equity
Current liabilities % % 100.00 %
Common stock 100.00
Other paid-in capital 100.00
Retained earnings 100.00
Total liabilities and equity % % 100.00 %

In: Accounting