hello quizlet
Home
Subjects
Expert solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Everything You Need to Know about Programming
Flashcards
Learn
Test
Match
Flashcards
Learn
Test
Match
Terms in this set (12)
cloud services
a type of Internet-based computing that provides processing resources and data to computers on demand
framework
something that gives programmers most of the basic building blocks they need to create a program
user interface
the point of human-computer interaction and communication in a device
compiler
a computer program that translates computer code written in one programming language into another programming language
agile development
a methodology that ensures flexibility and adaptability during the development and maintenance of software
database
a set of organized information
server
a type of computer or device on a network that manages network resources
syntax
spelling and grammar of a programming language
variable
labels that help programmers store important bits of information
algorithm
rules that teach computers how to work things out on
their own
bug
an error in a program that prevents the program from running as expected.
function
a block of organized, reusable code
Other sets by this creator
ES Masters Straight from the Kitchen Corner Podcast
18 terms
Challenge Accepted 9 Irregular verbs
86 terms
Challenge Accepted 9 Section 4
7 terms
Challenge Accepted 9 Section 3 TFNW Mate…
12 terms
Verified questions
computer science
A self-organizing list is a linked list of n elements, in which each element has a unique key. When we search for an element in the list, we are given a key, and we want to find an element with that key. A self-organizing list has two important properties: 1. To find an element in the list, given its key, we must traverse the list from the beginning until we encounter the element with the given key. If that element is the kth element from the start of the list, then the cost to find the element is k. 2. We may reorder the list elements after any operation, according to a given rule with a given cost. We may choose any heuristic we like to decide how to reorder the list. Assume that we start with a given list of n elements, and we are given an access sequence $$ σ = ⟨σ_1, σ_2, ...,σ_m⟩ $$ of keys to find, in order. The cost of the sequence is the sum of the costs of the individual accesses in the sequence. Out of the various possible ways to reorder the list after an operation, this problem focuses on transposing adjacent list elements—switching their positions in the list—with a unit cost for each transpose operation. You will show, by means of a potential function, that a particular heuristic for reordering the list, move-to-front, entails a total cost no worse than 4 times that of any other heuristic for maintaining the list order—even if the other heuristic knows the access sequence in advance! We call this type of analysis a competitive analysis. For a heuristic H and a given initial ordering of the list, denote the access cost of sequence σ by $$ C-H( σ) $$ . Let m be the number of accesses in σ. a. Argue that if heuristic H does not know the access sequence in advance, then the worst-case cost for H on an access sequence σ is $$ C_H(σ) = Ω(m n) $$ . With the move-to-front heuristic, immediately after searching for an element x, we move x to the first position on the list (i.e., the front of the list). Let $$ rank_L(x) $$ denote the rank of element x in list L, that is, the position of x in list L. For example, if x is the fourth element in L, then $$ rank_L(x) = 4 $$ . Let $$ c_i $$ denote the cost of access $$ σ_i $$ using the move-to-front heuristic, which includes the cost of finding the element in the list and the cost of moving it to the front of the list by a series of transpositions of adjacent list elements. b. Show that if $$ σ_i $$ accesses element x in list L using the move-to-front heuristic, then $$ c_i = 2 · rank_L(x) - 1 $$ . Now we compare move-to-front with any other heuristic H that processes an access sequence according to the two properties above. Heuristic H may transpose elements in the list in any way it wants, and it might even know the entire access sequence in advance. Let $$ L_i $$ be the list after access $$ σ_i $$ using move-to-front, and let $$ L^*_i $$ be the list after access $$ σ_i $$ using heuristic H. We denote the cost of access $$ σ_i $$ by $$ c_i $$ for move-to-front and by $$ c^*_i $$ for heuristic H. Suppose that heuristic H performs $$ t^*_i $$ transpositions during access $$ σ_i $$ . c. In part (b), you showed that $$ c_i = 2 · rank_{L_i-1}(x) - 1 $$ . Now show that $$ c^*_i = rank_{L^*_i-1} (x) + t^*_i $$ . We define an inversion in list $$ L_i $$ as a pair of elements y and z such that y precedes z in $$ L_i $$ and z precedes y in the list $$ L^*_i $$ . Suppose that list $$ L_i $$ has $$ q_i $$ inversions after processing the access sequence $$ ⟨σ_1, σ_2, ..., σ_i⟩ $$ . Then, we define a potential function Φ that maps $$ L_i $$ to real number by $$ Φ(L_i) = 2q_i $$ . For example, if $$ L_i $$ has the elements ⟨e, c, a, d, b⟩ and $$ L^*_i $$ has the elements ⟨c, a, b, d, e⟩, then $$ L_i $$ has 5 inversions ((e, c), (e, a), (e, d), (e, b), (d, b)), and so $$ Φ(L_i) = 10 $$ . Observe that $$ Φ(L_i) ≥ 0 $$ for all i and that, if move-to-front and heuristic H start with the same list $$ L_0 $$ , then $$ Φ(L_0) = 0 $$ . d. Argue that a transposition either increases the potential by 2 or decreases the potential by 2. Suppose that access $$ σ_i $$ finds the element x. To understand how the potential changes due to $$ σ_i $$ , let us partition the elements other than x into four sets, depending on where they are in the lists just before the ith access: · Set A consists of elements that precede x in both $$ L_{i-1} $$ and $$ L^*_{i-1} $$ . · Set B consists of elements that precede x in $$ L_{i-1} $$ and follow x in $$ L^*_{i-1} $$ . · Set C consists of elements that follow x in $$ L_{i-1} $$ and precede x in $$ L^*_{i-1} $$ . ·Set D consists of elements that follow x in both $$ L_{i-1} $$ and $$ L^*_{i-1} $$ .
computer science
One technique for implementing lottery scheduling works by assigning processes lottery tickets, which are used for allocating CPU time. Whenever a scheduling decision has to be made, a lottery ticket is chosen at random, and the process holding that ticket gets the CPU. The BTV operating system implements lottery scheduling by holding a lottery 50 times each second, with each lottery winner getting 20 milliseconds of CPU time (20 milliseconds × 50 = 1 second). Describe how the BTV scheduler can ensure that higher-priority threads receive more attention from the CPU than lower-priority threads.
computer science
Write an if statement that checks if the variable a is equal to 1. If it is equal to 1, print a message saying ‘a equals 1’, else print ‘a is not equal to 1’.
computer science
What are the implications of supporting UNIX consistency semantics for shared access to files stored on remote file systems?
Recommended textbook solutions
Python for Everyone
2nd Edition
Cay S. Horstmann, Rance D. Necaise
730 solutions
Python for Everyone
1st Edition
Cay S. Horstmann, Rance D. Necaise
633 solutions
Python for Everyone Interactive Edition
2nd Edition
Cay S. Horstmann, Rance D. Necaise
730 solutions
Python for Everyone
2nd Edition
Cay S. Horstmann, Rance D. Necaise
730 solutions
Other Quizlet sets
AP US Govt Court Cases
50 terms
Chapter 2 Management
20 terms
Fundamentals of Nursing - Communication…
86 terms