HW2 Solution
.pdf
keyboard_arrow_up
School
University of Pennsylvania *
*We aren’t endorsed by this school
Course
5960
Subject
Computer Science
Date
Feb 20, 2024
Type
Pages
31
Uploaded by PresidentKangaroo6014
CIT 5960-Fall 2023 Module 3-4 Homework Assignment
Jonathan Wan, Tuan Le, Helen Yue
TOTAL POINTS
95 / 100
QUESTION 1
Q1
20 pts
1.1 4 / 4
✓
- 0 pts Correct
- 3 pts Lack of explanation
- 4 pts Incorrect or no attempt
- 2 pts Correct explanation but incorrect final
answer
1.2 4 / 4
✓
- 0 pts Correct
- 2 pts Lack of explanation
- 4 pts Incorrect or no attempt
- 3 pts Correct explanation but incorrect final
answer
1.3 4 / 4
✓
- 0 pts Correct
- 2 pts Lack of explanation
- 4 pts Incorrect or no attempt
- 2 pts Correct explanation but incorrect final
answer
1.4 4 / 4
✓
- 0 pts Correct
- 2 pts Correct explanation but incorrect final
answer
- 3 pts Incorrect explanation but correct final
answer
- 3 pts Lack of explanation
- 4 pts Incorrect or no attempt
1.5 4 / 4
✓
- 0 pts Correct
- 3 pts Lack of/Incorrect explanation
- 1 pts Correct explanation but incorrect final
answer
- 4 pts Incorrect or no attempt
QUESTION 2
2 Q2 23 / 25
- 0 pts Correct
Algorithm (10 pts)
- 10 pts Missing algorithm
- 8 pts Incorrect algorithm
- 6 pts Partially correct/Incomplete algorithm
✓
- 2 pts Minor errors in algorithm
POC (9 pts)
- 9 pts No correctness proof
- 5 pts Incomplete proof (doesn't handle all
cases, base case or inductive step is missing)
- 2 pts Minor errors or missing justifications in
proof
Runtime (6 pts)
- 6 pts No runtime analysis
- 4 pts Incorrect order of complexity
- 2 pts Partially correct analysis (right order of
complexity but missing / incorrect reasoning)
Running Quickselect r times is not
necessary.
QUESTION 3
3 Q3 15 / 15
✓
- 0 pts Correct
Algorithm (6 points)
- 6 pts Missing algorithm:
- 4 pts Partially correct/Incomplete algorithm
- 2 pts Minor errors in algorithm
- 6 pts Wrong algorithm
Correctness proof (6 points)
- 6 pts No correctness proof
- 3 pts Incomplete proof (doesn't handle all
cases, base case or inductive step is missing)
- 2 pts Minor errors or missing justifications in
proof
Runtime analysis (3 points)
- 3 pts No runtime analysis
- 2 pts Incorrect order of complexity
- 1 pts Partially correct analysis (right order of
complexity but missing or incorrect reasoning)
QUESTION 4
Q4
20 pts
4.1 Q4.1 8 / 10
- 0 pts Correct
- 10 pts Incorrect
Algorithm (4 points)
✓
- 2 pts Partially correct/Incomplete algorithm
- 4 pts Missing / Incorrect
Correctness proof (4 points)
- 4 pts Missing / Incorrect
- 2 pts Incomplete proof / Minor Error
Runtime analysis (2 points)
- 2 pts Missing / Incorrect
- 1 pts Didn't mention compute time of each
indicator (max / min)
- 1 pts Didn't mention a constant number of
pass
2nd case is incorrect- we could have xi = xj
for some teams tj ∈
S2 but yi ≥
yj for all
other teams in S2 is the correct case.
4.2 Q4.2 9 / 10
- 0 pts Correct
- 10 pts Incorrect / Missing
Algorithm (4 pts)
- 4 pts Incorrect / Missing
- 2 pts Didn't recursively call on two halves (no
QuickSelect)
✓
- 1 pts Didn't use (a)
POC (4 pts)
- 4 pts Incorrect / Missing
- 1 pts Didn't reason base case
- 1 pts Incorrect induction hypothesis
- 2 pts Incorrect induction step
Runtime (2 pts)
- 2 pts Missing / Incorrect
- 1 pts Cite QuickSelect runtime
- 1 pts Fail to give and solve recurrence relation
QUESTION 5
5 Q5 20 / 20
✓
- 0 pts Correct
Algorithm (8 points)
- 8 pts Missing algorithm:
- 4 pts Partially correct/Incomplete algorithm
- 2 pts Minor errors in algorithm
Correctness proof (6 points)
- 6 pts No correctness proof
- 3 pts Incomplete proof (doesn't handle all
cases, base case or inductive step is missing)
- 2 pts Minor errors or missing justifications in
proof
- 1 pts Need a bit more details
Runtime analysis (6 points)
- 6 pts No runtime analysis
- 4 pts Incorrect order of complexity
- 2 pts Partially correct analysis (right order of
complexity but missing or incorrect reasoning)
- 1 pts Need a bit more details
- 20 pts Incorrect or no attempt
Page 3
1.1 4 / 4
✓
- 0 pts Correct
- 3 pts Lack of explanation
- 4 pts Incorrect or no attempt
- 2 pts Correct explanation but incorrect final answer
Page 5
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
what is memoization and when/how can it be useful in solving a given problem?
arrow_forward
Computer science
Define the terms "accuracy" and "consistency" in the context of the study goal. Experimental
arrow_forward
Please answer this question no plagiarism. Correct answers from experts . Thanks
arrow_forward
Write SRS document as per IEEE Std 830-1998 of your assigned semester project. ( Airline Ticket Reservation System )
The following issues shall be addressed by the SRS writer:
Functionality
External Interface
Performance
Quality Attributes
Design constraints imposed on implementation
arrow_forward
What is the term that is used to describe the part of the process of problem solving that requires the use of judgment or common sense?
arrow_forward
Solve the system using
Design the Use Case Diagram (contains at least 10 use cases)
(Example)
arrow_forward
Goal driven reasoning deduces a problem solution from initial data1.true2.False
Note: Select one answer between those 2
arrow_forward
A university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students.
Details for this assignment are provided below.
The Students and the TA Using threads (Section 4.4), begin by creating n students. Each will run as…
arrow_forward
A university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students.
Can you please write the code for above solution in java
arrow_forward
A university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students.
Can you please write the code for above solution in python
arrow_forward
A university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students.
Details for this assignment are provided below.
The Students and the TA Using threads (Section 4.4), begin by creating n students. Each will run as…
arrow_forward
A step-by-step procedure used to solve a problem is called Algorithm explain?
arrow_forward
Which aspects of the problem need to be taken into consideration before it can be fixed? Also, what exactly does each line of the debugging recommendations mean?
arrow_forward
How should one go about compiling information for a thorough how-to guide? If you run a sequential search for 4000 names, how many possible outcomes are there?
arrow_forward
Define DESIGN CHART APPROACH
arrow_forward
Home work
Find a schedulable algorithm for the periodic set of tasks which
has the following characteristics:
●
tasks
T₁
T22
●
C
3
1
Home work
Find a schedulable algorithm for the periodic set of tasks which
has the following characteristics:
tasks
T₁
T₂
T
5
4
C
3
1
T
5
4
15
arrow_forward
Computer Science
Using computers and other automated tools to grade true-false and multiple-choice tests is widespread, but grading essays has been reserved for instructors. Until now. Software developed by a nonprofit enterprise founded by Harvard and MIT recently released software that can grade student essays and short written answers. Students answer online instead of in a blue book and immediately receive their grade after clicking a Send button. The software uses artificial intelligence (it initially “learns” how to grade an instructor’s test by reviewing 100 essay exams that the instructor scored) and is designed to free up professors for other tasks, as well as give students the opportunity to immediately revise their graded essays for an improved grade. But does the system work? Are the automated grades similar to what a human grader would award? Skeptics (including the National Council of Teachers of English) say no. Objections include a lack of tests to support the validity…
arrow_forward
What is the name of the approach used to resolve a problem that entails a number of
steps?
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- what is memoization and when/how can it be useful in solving a given problem?arrow_forwardComputer science Define the terms "accuracy" and "consistency" in the context of the study goal. Experimentalarrow_forwardPlease answer this question no plagiarism. Correct answers from experts . Thanksarrow_forward
- Write SRS document as per IEEE Std 830-1998 of your assigned semester project. ( Airline Ticket Reservation System ) The following issues shall be addressed by the SRS writer: Functionality External Interface Performance Quality Attributes Design constraints imposed on implementationarrow_forwardWhat is the term that is used to describe the part of the process of problem solving that requires the use of judgment or common sense?arrow_forwardSolve the system using Design the Use Case Diagram (contains at least 10 use cases) (Example)arrow_forward
- Goal driven reasoning deduces a problem solution from initial data1.true2.False Note: Select one answer between those 2arrow_forwardA university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students. Details for this assignment are provided below. The Students and the TA Using threads (Section 4.4), begin by creating n students. Each will run as…arrow_forwardA university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students. Can you please write the code for above solution in javaarrow_forward
- A university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students. Can you please write the code for above solution in pythonarrow_forwardA university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another student. When there are no students who need help, the TA sits at the desk and takes a nap. If a student arrives and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time. Using threads, implement a solution that coordinates the activities of the TA and the students. Details for this assignment are provided below. The Students and the TA Using threads (Section 4.4), begin by creating n students. Each will run as…arrow_forwardA step-by-step procedure used to solve a problem is called Algorithm explain?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education