Computer Information System: Algorithms and Data Structures Study

Verified

Added on  2020/04/21

|7
|654
|379
Homework Assignment
AI Summary
The homework assignment delves into key topics within theoretical computer science through problem-solving exercises focused on sequences, binary search trees, linked lists, and recursion. It begins with analyzing a sequence problem where an algorithm determines specific values based on input conditions. Following this, it explores the concept of binary search trees by referencing theoretical frameworks and data organization techniques. The assignment further delves into linked list operations, particularly concerning student data management and insertion techniques. Additionally, recursive algorithms are addressed, emphasizing their structure and application in solving complex problems. Throughout, references to established literature provide a robust foundation for understanding these concepts. This comprehensive exploration aims to enhance the learner's problem-solving skills in theoretical computer science by engaging with both fundamental and advanced computational structures.
Document Page
Computer information system
Question 1
(a).Begin SEQ(N)
N=1
SEQ(1-3)+(1-2) =-3
N=2
SEQ(2-3)+(2-2) =-1
N=3
SEQ(3-3)+(3-2) =1
N=4
SEQ(4-3)+(4-2) =3
N=5
SEQ(5-3)+(5-2) =5
N=6
SEQ(6-3)+(6-2) =7
N=7
SEQ(7-3)+(7-2) =9
N=8
Seq(8)
SEQ(8-3)+(8-2) =11
Result of 6
N=6
SEQ(6-3)+(6-2) =7
(b)
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Algorithm call Recursive call
2
3
4
5
6
7
9
Question 2
Binary search tree Wyvill, B.( 2007.)
5
1 2
4
3 1 3
1 4 2 1
(b)
e
f h
i l
n o
r s t w
Document Page
I. e,f,h,i,l,h,o,r,s,t,w
II. e,f,I,r,s,h,t,w,h,n,o
III. e,f,I,r,s,h,t,w,h,n,o
IV. r,I,s,f,t,l,e,w,n,h,o
V. r,s,I,t,w,l,f,n,h,e,o
(c).
1. BEGIN Letter(n)
2. Get letter e;
3.Repeat the same for r,s,I,t,w,l,f,n,h,e,o
4.if e appears more than the others than the others.
5.Return e has high frequency.
6.Else return one of the others has high frequency.
7. End
Question 3 Wyvill, B.( 2007).
105
Document Page
0 1
0 1
0 1
0 1
(b).
(01010101)=8bits
Question 4
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
(a). Single linked list information of one student points to the next one since their details have
no relationship
(b).
1. Begin (Displaynumber female students)(slist)
2. set intake number to 5
3. Repeat step for intake 6 and 7.
4. Select form slist where intake number =5 &6 & 7 and where gender= F
5. Set the values to slist
6. Print slist
7. END
(C).
Begin(student name,id,intake number,gender)
if (name!=empty)
if(id!=empty)
if(intake number!=empty)
if(gender !=empty)
get name;
get id
get intake number;
get gender;
print(“The student successfully added to the system”);
End
Question 5
1,3,5,7,9,11,13,15,2,5,16,12,14
Question 6
Document Page
Begin append(Q,p)
If((p) is not empty)
Deque p;
Return x=p;
Else(
Enque(Q,X)
)
END
References
Document Page
Wyvill, G., McPheeters, C. and Wyvill, B., 2007. Data structure forsoft objects. The visual
computer, 2(4), pp.227-234.
Losasso, F., Gibou, F. and Fedkiw, R., 2010, August. Simulating water and smoke with an octree
data structure. In ACM Transactions on Graphics (TOG) (Vol. 23, No. 3, pp. 457-462). ACM.
chevron_up_icon
1 out of 7
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]