Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Discrete Mathematics Help! Big theta notiation and psuedocode of loops. please answer a) i) ii) b) i) ii) and c) i) ii) there should be

Discrete Mathematics Help! Big theta notiation and psuedocode of loops.

image text in transcribed

please answer a) i) ii) b) i) ii) and c) i) ii) there should be 6 answers and please explain!

3. (a) Consider the procedure procedure Loopsl (n, a positive integer) 1. for i 1 to n 2. for i 1 to n print (i,j) 3. i. In terms of n, how many ordered pairs are printed? ii. What is the runtime in e notation of this procedure? (b) Consider the procedure procedure Loops2 (n, a positive integer) 1. for k 1 to 2. for 1 to n for i i 1 to n 3. prints (i,j) i. In terms of n, how many ordered pairs are printed? ii. What is the runtime in e notation of this procedure? (c) Consider the procedure procedure Loops3(n, a power of 2) 1. for 1 to n i 3. while j> 1 print (i,j) i. In terms of n, how many ordered pairs are printed? ii. What is the runtime in e notation of this procedure

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

=+8. Why is productivity important?

Answered: 1 week ago

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago