Questions
Create Gantt Chart and network Diagram Task Precedes Optimistic MostLikely Pessimistic Norm$ CrashTime Crash$ A D...

Create Gantt Chart and network Diagram

Task Precedes Optimistic MostLikely Pessimistic Norm$ CrashTime Crash$
A D 4 4 4 1000 3 1301
B E 2 3 28 1391 4 2000
C F 2 4 12 2000 4 2713
D G 2 3 22 1198 5 1400
E G 1 4 7 899 3 1100
F H 7 10 19 2500 6 3765
G H 1 3 11 792 3 1450
H none 2 2 8 300 1 504

In: Operations Management

7.11. Consider production ratios of 2:1:1, 3:2:1, and 5:3:2 for oil, gasoline, and heating oil. Assume...

7.11. Consider production ratios of 2:1:1, 3:2:1, and 5:3:2 for oil, gasoline, and heating oil. Assume that other costs are the same per gallon of processed oil.

a. Which ratio maximizes the per-gallon profit if oil costs $80/barrel, gasoline is $2/gallon, and heating oil is $1.80/gallon?

b. Suppose gasoline costs $1.80/gallon and heating oil $2.10/gallon. Which ratio maximizes profit?

c. Which spread would you expect to be most profitable during the summer? Which during the winter?

In: Finance

Prove that 1+ cos theta + cos 2theta + .... cos ntheta = 1/2 + (sin(n+1/2)theta)/2sin(theta/2)

Prove that 1+ cos theta + cos 2theta + .... cos ntheta = 1/2 + (sin(n+1/2)theta)/2sin(theta/2)

In: Advanced Math

Climbing Stairs Bibi climbs stairs of a multi-leveled building. Every time Bibi climbs a set of...

Climbing Stairs

Bibi climbs stairs of a multi-leveled building. Every time Bibi climbs a set of stairs, she counts the steps starting from 1 to the number of steps in that particular set of stairs while climbing the stairs. For example if she climbs two set of stairs, the first containing 5 steps and the second containing 3 steps, she will say 1, 2, 3, 4, 5, 1, 2, 3 and the total number of steps would be 8. Find the number of steps that Bibi climbed in each set of steps.

Format Input:

The first line of the input contains an integer N, the number of numbers Bibi said. The second line of the input contains N integers Ai , the i-th number Bibi said. The given sequence of Ai will be a valid sequence, that means the whole input can be cut into sequences of 1, 2, . . . , X, where X is the number of steps in a set of stairs.

Format Output:

Print the number of steps that Bibi climbed for each set of steps, in the order of the input sequence, separated by single spaces. There is no leading and trailing spaces in the output.

Constraints

1 ≤ N ≤ 1, 000

1 ≤ Ai ≤ 1, 000

• The given sequence of Ai will be a valid sequence, that means the whole input can be cut into sequences of 1, 2, . . . , X, where X is the number of steps in a set of stairs.

Sample Input 1 (standard input):

8

1 2 3 4 5 1 2 3

Sample Output 1 (standard output):

5 3

Sample Input 2 (standard input):

10

1 2 1 1 2 3 4 1 2 3

Sample Output 2 (standard output):

2 1 4 3

Sample Input 3 (standard input):

5

1 2 3 4 5

Sample Output 3 (standard output):

5

Note The first sample is the example from the problem description.

In the second sample:

The first set of stairs have 2 steps, current sequence is ”1, 2

second set have 1 steps, current sequence is ”1, 2, 1

third set have 4 steps, current sequence is ”1, 2, 1, 1, 2, 3, 4

last set have 3 steps, current sequence is ”1, 2, 1, 1, 2, 3, 4, 1, 2, 3”, just like the input

In the third sample, there is only one set of stairs which contains 5 steps.

*Note: Use C language and long long int (must be the same as the constraint)

In: Computer Science

Need Java Code and UML Design for the following program: Use the Account class created above...

Need Java Code and UML Design for the following program:

Use the Account class created above to simulate an ATM machine. Create five accounts in an array with id 0, 1, ..., 4, and initial balance $100. The system prompts the user to enter an id. If the id is entered incorrectly, ask the user to enter a correct id. Once an id is accepted, the main menu is displayed as shown in the sample run (see below). You can enter a choice 1 for viewing the current balance, 2 for withdrawing money, 3 for depositing money, and 4 for exiting the main menu. Once you exit, the system will prompt for an id again. Thus, once the system starts, the ATM machine will not stop.

Sample run of the ATM machine is as follows: Enter an id to start transactions: 4

Main menu
1: check balance
2: withdraw
3: deposit
4: exit
Enter a choice: 1 The balance is 100.0

Main menu
1: check balance 2: withdraw

3: deposit
4: exit
Enter a choice: 2
Enter an amount to withdraw: 3

Main menu
1: check balance
2: withdraw
3: deposit
4: exit
Enter a choice: 1 The balance is 97.0

Main menu
1: check balance
2: withdraw
3: deposit
4: exit
Enter a choice: 3
Enter an amount to deposit: 10

Main menu
1: check balance
2: withdraw
3: deposit
4: exit
Enter a choice: 1 The balance is 107.0

Main menu
1: check balance 2: withdraw
3: deposit
4: exit
Enter a choice: 4

Enter an id to start transactions:

In: Computer Science

These code are correct, and I want some explanation or comment for them(purpose for each function)...

These code are correct, and I want some explanation or comment for them(purpose for each function)

def annoying_factorial(n):
if n == 0 or n == 1:
return 1
if n == 2:
return 2
if n == 3:
return 6
if n == 4:
return 4 * annoying_factorial(3)
if n == 5:
return 5 * annoying_factorial(4)
if n == 6:
return 6 * annoying_factorial(5)
else:
return n * annoying_factorial(n-1)

def annoying_fibonacci(n):
if n==0:
return 0
if n==1:
return 1
if n==2:
return 1
if n==3:
return 2
if n==4:
return annoying_fibonacci(4-1)+annoying_fibonacci(4-2)
if n==5:
return annoying_fibonacci(5-1)+annoying_fibonacci(5-2)
if n==6:
return annoying_fibonacci(6-1)+annoying_fibonacci(6-2)
else:
return(annoying_fibonacci(n-1)+annoying_fibonacci(n-2))

def is_sorted_recursive(head):
if head == None or head.next == None:
return True
else:
t = head
if t.val > t.next.val:
return False
return is_sorted_recursive(head.next)

def accordion_recursive(head):
if head == None:
return None
new_head = head.next
if new_head != None and new_head.next != None:
new_head.next = accordion_recursive(new_head.next)
return new_head

In: Computer Science

def annoying_factorial(n): if n == 0 or n == 1: return 1 if n == 2:...

def annoying_factorial(n):
if n == 0 or n == 1:
return 1
if n == 2:
return 2
if n == 3:
return 6
if n == 4:
return 4 * annoying_factorial(3)
if n == 5:
return 5 * annoying_factorial(4)
if n == 6:
return 6 * annoying_factorial(5)
else:
return n * annoying_factorial(n-1)

def annoying_fibonacci(n):
if n==0:
return 0
if n==1:
return 1
if n==2:
return 1
if n==3:
return 2
if n==4:
return annoying_fibonacci(4-1)+annoying_fibonacci(4-2)
if n==5:
return annoying_fibonacci(5-1)+annoying_fibonacci(5-2)
if n==6:
return annoying_fibonacci(6-1)+annoying_fibonacci(6-2)
else:
return(annoying_fibonacci(n-1)+annoying_fibonacci(n-2))

def is_sorted_recursive(head):
if head == None or head.next == None:
return True
else:
t = head
if t.val > t.next.val:
return False
return is_sorted_recursive(head.next)

def accordion_recursive(head):
if head == None:
return None
new_head = head.next
if new_head != None and new_head.next != None:
new_head.next = accordion_recursive(new_head.next)
return new_head

add some comments plz

In: Computer Science

Which is not a valid quantum number for a ground state electron on an atom of...

Which is not a valid quantum number for a ground state electron on an atom of germanium?

a) n=2 l=1 ml=0 ms=+1/2
b) n=4 l=3 ml=-2 ms=-1/2
c) n=4 l=1 ml=-1 ms=+1/2
d) n=3 l=0 ml=0 ms=+1/2
e) n=3 l=2 ml=1 ms=-1/2

In: Chemistry

Question B: The following data report length of stay (LOS) for 10 patients of Dr. Jones...

Question B: The following data report length of stay (LOS) for 10 patients of Dr. Jones and 10 patients of Dr. Smith. What is the expected outcome (average outcome) for Dr. Smith? What is the expected outcomes if Dr. Jones if he was seeing Dr. Smith's patients? To answer this question, replace each outcome of Dr. Jones with average outcome of same type of patient seen by Dr. Smith. Is Dr. Smith more efficient than Dr. Jones?

Dr. Smith Patients Previous MI CHF Shock LOS
1 1 1 0 4
2 1 1 0 5
3 1 0 0 4
4 1 0 1 5
5 1 0 1 4
6 1 0 1 4
7 1 0 1 5
8 0 0 0 2
9 0 0 0 2
10 0 0 0 1
Dr. Jones Patients previous MI CHF Shock LOS
1 1 1 0 5
2 1 1 0 5
3 1 1 0 5
4 1 1 1 5
5 1 0 1 5
6 1 0 1 5
7 1 0 1 5
8 1 0 0 4
9 0 0 0 2
10 0 0 0 2

In: Statistics and Probability

Fill in the blanks in the table below. Country Nominal GDP growth Population growth Inflation Real...

Fill in the blanks in the table below.

Country

Nominal
GDP growth

Population
growth

Inflation

Real GDP
growth per capita

Svea

4%

3%

% ??

-1%

Bonifay

3%

1%

0%

% ??

Chaires

% ??

2%

6%

4%

Drifton

5%

1%

-2%

%

Estiffanulga

7%

% ??

2%

4%

In: Economics