Questions
Problem: Clique In this problem IS stands for Independent Set. The usual IS problem, that we...

Problem: Clique

In this problem IS stands for Independent Set.

The usual IS problem, that we showed in class in NP-complete is as follows:

Input: Unidrected graph G(V, E) and number k, with 1 ≤ k ≤ n.
Output: YES if G has an independent set of containing at least k vertices.
  NO if all independent sets of G contain strictly less than k vertices.

Definition: Let G(V, E) be an undirected graph and let V ′ be a proper subset of vertives of V : V ′ ⊂ V . We sat thay V is a clique of size k=|V′| if and only if, for all u∈V′ and for all u != v in V′ the edge{u,v}∈E.

Now define the Clique problem as follows:

Input: Unidrected graph G(V, E) and number k, with 1⌉ ≤ k ≤ n.
Output: YES if G has a clique containing at least k vertices.
  NO if cliques of G contain strictly less than k vertices.

Show that IS≤ pCLIQUE.

In: Statistics and Probability

Business law, please write a short court cases on cases below. Stephen A. Wheat v. Sparks...

Business law, please write a short court cases on cases below.

Stephen A. Wheat v. Sparks

J.T. ex rel. Thode v. Monster Mountain.

Clark’s Sales and Service v. Smith

Browning v. Poirer

Sogeti USA v. Scariano

Killian v. Ricchetti

In: Accounting

20 mL of 15% HCl(v/v) 1000 mL of 10% HCl(w/v) Give the percentages of the following:...

20 mL of 15% HCl(v/v)

1000 mL of 10% HCl(w/v)

Give the percentages of the following: 130 mg of HCl + 90 g of H20

How many grams of sodium chloride are there in 0.75 L of a 5% solution?

What weight of NaOH would be required to prepare 500 mL of a 1.5 M solution?

A solution contains 25 g NaCl/L. What is its molarity?

What is the molecular weight of NaCl?

What is the equivalent weight of NaCl?

What is the molecular weight of MgCl2?

What is the equivalent weight of MgCl2?

Describe how to make a 3M solution of Na2SO4

What weight of H2SO4 is required to prepare 500 mL of a 2M solution?

Explain how to prepare a 2N solution of HCl

Explain how to prepare a 3N solution of MgCl2

Please explain how to prepare the following:

400 ml of a 2% glucose solution from a 50% solution available.

A 2% solution of HCL is required for a procedure. A 6% solution is available. How much of the 6% solution will be required to make 1000 mL of a 2% solution?

A procedure calls for acetic acid and water; with the proportions being one part acetic acid to four parts water. 200 mL are needed. How much acetic acid and water are required?

1 L of 70% alcohol is needed. How much 95% alcohol is required to make the 70% solution?

75 mL of a 1N HCL solution is needed. You have a 5N solution available. How will you go about preparing this solution?

In: Chemistry

The paper “Cigarette Tar Yields in Relation to Mortality from Lung Cancer in the Cancer Prevention...

The paper “Cigarette Tar Yields in Relation to Mortality from Lung Cancer in the Cancer Prevention Study II Prospective Cohort “ (British Medical Journal [2004]: 72-79) included the accompanying data on the tar level of cigarettes smoked for a sample of male smokers who subsequently died of lung cancer.

Tar Level Frequency
0-7mg 103
8-14 mg 378
15-21 mg 563
≥ 22 mg 150

Assume it is reasonable to regard the sample as representative of male smokers who die of lung cancer. Is there convincing evidence that the proportion of male smoker long cancer death is not the same for the four given tar level categories?

In: Statistics and Probability

The birthday problem considers the probability that two people in a group of a given size...

The birthday problem considers the probability that two people in a group of a given size have the same birth date. We will assume a 365 day year (no leap year birthdays).

Code set-up

Dobrow 2.28 provides useful R code for simulating the birthday problem. Imagine we want to obtain an empirical estimate of the probability that two people in a class of a given size will have the same birth date. The code

trial = sample(1:365, numstudents, replace=TRUE)

simulates birthdays from a group of numstudents students. So you can assign numstudents or just replace numstudents with the number of students in the class of interest.

If we store the list of birthdays in the variable trial, the code

2 %in% table(trial)

will create a frequency table of birthdays and then determine if there is a match (2 birthdays the same). We can use this code in an if-else statement to record whether a class has at least one pair of students with the same birth date. We then can embed the code within a for-loop to repeat the experiment, store successes in a vector, and then take the average number of successes (a birthday match) across the repeated tasks.

The problems

  • Simulate the birthday problem to obtain an empirical estimate of the probability that two people in a class of 23 will have the same birth date. In particular, simulate birthdays for 1000 classes (for(i in 1:1000){...}) each of size 23 and compute the proportion of these classes in which at least one pair of students has the same birth date.

Recall that the true probability is 1-prod(seq(343,365))/(365)^23 which is approximately 50%.

  • Using your simulation code, estimate the number of students needed in the class so that the probability of a match is 95%. (You may do this by trial and error.)
  • Using your simulation code, find the approximate probability that three people have the same birthday in a class of 50 students.

# [Place code here]

Place your answers to the three items below here:

  • [Ans 1]

    The birthday problem considers the probability that two people in a group of a given size have the same birth date. We will assume a 365 day year (no leap year birthdays).

    Code set-up

    Dobrow 2.28 provides useful R code for simulating the birthday problem. Imagine we want to obtain an empirical estimate of the probability that two people in a class of a given size will have the same birth date. The code

    trial = sample(1:365, numstudents, replace=TRUE)

    simulates birthdays from a group of numstudents students. So you can assign numstudents or just replace numstudents with the number of students in the class of interest.

    If we store the list of birthdays in the variable trial, the code

    2 %in% table(trial)

    will create a frequency table of birthdays and then determine if there is a match (2 birthdays the same). We can use this code in an if-else statement to record whether a class has at least one pair of students with the same birth date. We then can embed the code within a for-loop to repeat the experiment, store successes in a vector, and then take the average number of successes (a birthday match) across the repeated tasks.

    The problems

  • Simulate the birthday problem to obtain an empirical estimate of the probability that two people in a class of 23 will have the same birth date. In particular, simulate birthdays for 1000 classes (for(i in 1:1000){...}) each of size 23 and compute the proportion of these classes in which at least one pair of students has the same birth date.
  • Recall that the true probability is 1-prod(seq(343,365))/(365)^23 which is approximately 50%.

  • Using your simulation code, estimate the number of students needed in the class so that the probability of a match is 95%. (You may do this by trial and error.)
  • Using your simulation code, find the approximate probability that three people have the same birthday in a class of 50 students.
  • # [Place code here]

    Place your answers to the three items below here:

  • [Ans 1]

In: Statistics and Probability

verify that the function det has the following properties 1. det(... ,v,..., v,...)=0 2. det(...,cv+dw,...)=c*det(...,v,...)+d*det(...,w,...) 3....

verify that the function det has the following properties

1. det(... ,v,..., v,...)=0

2. det(...,cv+dw,...)=c*det(...,v,...)+d*det(...,w,...)

3. use the above properties and normalization to prove that

A= det(...,v+cw,...w,...)=det(...,v,...,w,...)

B=det(...,v,...,w,...)= (-1)*det(...,w,...,v,...) and

C= det [diag (λ1, ... , λn ) ] = Πiλi

In: Advanced Math

C++ Suppose the vector v = [4 -6 7]. Create three vectors: 1. p, which is...

C++

Suppose the vector v = [4 -6 7]. Create three vectors:

1. p, which is twice as long as v and points in the same direction as v
2. q, which has the same length as v and points in the opposite direction of v
3. r, which is three quarters the length of v and points in the same direction as v
Print out the results of each vector calculation.

In: Computer Science

Write a python program per the following specifications: 1. Populate an array(list) of size n =...

Write a python program per the following specifications:

1. Populate an array(list) of size n = 50 randomly with only integers 0 and 1

2. Repeat step 1 nn = 1000 times using either a while loop or a for loop see below

At this point you should have a total of 50000 observations with either 0 or 1

This is our experimental data which we will compare to the theoretical expected result

From Lab06template.py

import random

temp = -1

n = 50

nn = 1000 # note nn*n == 50000

# Theoretical calculations

print('======Theoretical results (what is expected) ==========')

#Using the Binomial distribution formulas on page 1

p = .5

print('1 the theoretical mean(average)of 1''s ( n*nn*p)

==', temp) # fix u == n*nn*p this is the expected

(average number of 1’s

print('2 the theoretical variance v == ', temp)

# fix # v = n*nn*p*(1-p)

print('3 the standard deviation SD (should be > 100) == ', temp)

# sd = square root(v) sd = sqrt(v)

# at this point in the code # we have the theoretical mean, variance, standard deviation

# now for the experimental results

print(' ========== Experimental results ========== ')

print(' ========== Populate a list and count 1’s ========== ')

temp = -1

a = 0

b = 1

MyList = []

j = 0 while (j < nn): # loop for 1000 times

i = 0

while i < n : # loop 50 times populate list of nn

randNum = random.randint(a,b)

MyList.append(randNum)

# count the number of 1’s and the number of 0

# use the count function # the number of 1’s + number 0’s == 50

# keep track of these counts and update the results

# with the next iteration

i = i +1

j = j + 1

print('4 the length of MyList == ', temp ) # FIX

use len()

print('5 the number of 1’s is ', temp ) # FIX

print('6 the number of 0’s is ', temp ) # fix

print('7 the average of all the ', n*nn,' integers is...', 'should be < 1) ', temp) # fix

print()

# fix SD = sqrt(v)

# Display the range (+- 2sd ) as follows:

# mean+ 2*SD mean – 2*SD

print('8 mean - 2*SD == ', temp) #fix

print('9 mean + 2*SD == ', temp) #fix

# Answer the question:

# is the total number of 1’s from 5 above

# mean – 2*SD < mean < mean + 2*SD true ? Yes or no

# within the range as calculated in 8 and 9 by printing

#‘Yes’ if it is within the range and

# ‘No’ if it is not within the range

answer = 'NO'

print('10 Is the number of 1''s within ave +- 2*SD ', answer) # FIX

#Display 10 lines, 25 integers per line of the n*nn (== 50000) integers

# That is, display the integers in MyList, 25 per line, for 10 lines

# and include the line number as in 1 , 2, 3, …10

# NOTE only display 10 lines with 25 values (= 0 or 1)

# and not all 50,000 integers

print('11 displaying 10 numbered lines with 25 integers per line ...')

# for your consideration will need adjustments

k = 0

sub = []

while (k < len(MyList) ):

sub = MyList[k: k+20] # Splice

print("...",k, sub) # do NOT print k only the # line number as in 1, 2,3

k = k+2000

In: Computer Science

Consider an electrochemical cell based on the following overall reaction, Fe(s) + 2Ag+(aq)  Fe2+(aq) +...

Consider an electrochemical cell based on the following overall reaction, Fe(s) + 2Ag+(aq)  Fe2+(aq) + 2Ag(s) Fe2+(aq) + 2e– Fe(s), ℰ° = –0.44 V Ag+(aq) + e– Ag, ℰ° = 0.80 V Calculate the cell potential (in V) for this reaction at 25oC when the concentration of Ag+ ions is 0.050 M and the concentration of Fe2+ ions is 1.50 M. a. +1.32 V b. +1.50 V c. +1.20 V d. -1.32 V e. -1.20 V

In: Chemistry

V is a subspace of inner-product space R3, generated by vector u =[1 1 2]T and...

V is a subspace of inner-product space R3, generated by vector

u =[1 1 2]T and v =[ 2 2 3]T.

T is transpose

(1) Find its orthogonal complement space V┴ ;

(2) Find the dimension of space W = V+ V┴;

(3) Find the angle q between u and v; also the angle b between u and normalized x with respect to its 2-norm.

(4) Considering v = av, a is a scaler, show the angle q’ between u and v

In: Advanced Math