LARA

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
sav08:playground [2010/03/30 20:28]
hossein
sav08:playground [2010/09/29 21:54]
hossein
Line 1: Line 1:
 ====== Playground ====== ====== Playground ======
 +
  
 ===== Problem 1: Linear Extension ===== ===== Problem 1: Linear Extension =====
Line 17: Line 18:
  
 d) Show that $\leq_1$ is a linear extension of $\leq$ if and only if $(A,​\leq_1)$ is a total order and the identity function is a monotone function from $(A,\leq)$ to $(A,​\leq_1)$. d) Show that $\leq_1$ is a linear extension of $\leq$ if and only if $(A,​\leq_1)$ is a total order and the identity function is a monotone function from $(A,\leq)$ to $(A,​\leq_1)$.
 +
 +===== Perl =====
 +
 +  * Write a regular expression that  matches a pair of <​d> ​ and </d> XML tags and the text between them. The text between the tags can include any other tags.
 +
 +  * The lexical analyzer typically finds the longest matches. Some languages such as Perl have introduced laziness in matching. By adding a question mark to the end of an operator its lazy version is obtained. For example, given an input '​aaaaa',​ the expression $a*$ will match the entire input. But the lazy version $a*?$ matches the minimum number of possible characters, which is the empty string. Using lazy repetition find a compact representation for the first part.