Answer to Question #225267 in Discrete Mathematics for Amir

Question #225267
Briefly answer the following short questions

1) Determine if the following argument is valid and explain why. Every CS

major takes CMSC203. Mr. Ali is taking CMSC203, therefore he is a CS

major.

2) What is the time complexity (in Big-O notation) of the following code? Your

answer should be a function of n. Also, what is the value of “sum” after the

execution of the code with n = 10?

sum := 0;

for i := 1 to n

for j := i to n

sum := sum + 1
1
Expert's answer
2022-01-31T12:02:39-0500

1)

Invalid: p "\\to" q and q do not support the conclusion of p


2)

Algorithm makes

"n(n-1)...1=n!" operations

so,

"f(n)=O(n!)"


for n = 10:

"sum=10+9+8+...+2+1=55"


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Furqan
11.08.21, 16:48

This application is very help full thanks sir

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS