What is the intuition behind average case algorithms?

What is the definition of Expectation of variable T?

Find the expectation of T for the following:


Find the expactation of the following:


What is a Randomized Algorithm?

What is the randomized algorithm type: Las Vegas?
What is an example of this algorithm?

What is the randomised algorithm type; Monte Carlo?

What are the advantages/disadvantages of randomized algorithms in general?

What are the advantages/disadvantages of Las Vegas algorithms?

What are the advantages/disadvantages of Monte Carlo algorithms?

Why does it make more sense to think about expected time instead of worst-case time for Las Vegas algorithms?

In general, how is MySQL used in PHP?

What are JSPs?
For scripting languages in general, what benefits that does provide?
Java Server Pages (JSP):
Like PHP, JSPs consist of static elements (normally text and HTML) and JSP “Elements” that generate dynamic content.
JSPs provide:
Which means:
What tags enclose a Java expression that is to be evaluated for JPS?
The time is
JSP support the embedding of short sequences of Java code, what do we call them?
What tags are used ot do this?
Called “Scriptlets”, these are embedded in HTML pages
Done with the tags (not that the ‘=’ sign is missing)
The time is:
NOTE: The declaration persists across tags
In general how would JSP be used to access submitted form data?
request.getParameter(“fname”) %>
The object request is built into JSPs and refs to the HTTP request recived by the webserver from the web browser (which contains the form data).
With JSPs and declarations, what does one need to remain mindful of?
Declarations are only processed once
Any declared data must be guarded to prevent invalid concurrent access
How would you use JSPs to include another page?
could have body here
This is an example of using predefined tags
What are ASPs?
Active Server Pages
What is required of the web server to run ASP scripts
An ASP-enabled web server supports the execution of server-sive ASP scripts
Such a server will invoke the ASP processory whenever a file with a .asp sufffix is encountered
In the ASP “Programming” model, what objects are available for use in ASP scripts?

At it’s most basic level what is the ASP Application object?
It represents the entire web application, conisisting of the various pages and associated scripts
It is initialized by the web server when the first client requests a related file
There is only a single Application object for a given application running on a server (even if there are many users)
What is an Application object’s physical manifestation?
All the .asp files in it’s corresponding [virtual] directory
Each Application object maintains colelctions of application-level variables and objects that have been added to it.
How are they accessed?
Collections are essentiall object-based associative arrays
Application.Contents - contains the share variables
Application.StaticObjects - maintains the object references
Elements in collections can be manipulated by it’s position index or the associated key