text:
Sunday, October 31, 2010

SICP 2.6: Church numerals

From SICP section 2.1.3 What Is Meant by Data?

Exercise 2.6 introduces us to the idea that in a language that can manipulate procedures, we can get by without integers altogether. The implementation of 0 and the operation of adding 1 are given as
(define zero (lambda (f) (lambda (x) x)))(define (add-1 n)   (lambda (f) (lambda (x) (f ((n f) x)))))

This representation is known as Church numerals, after its inventor, Alonzo Church, the logician who invented the λ calculus.

It's important to note that the definition for zero above does not evaluate to the integer 0, it is just a representation for 0.
> zero#<procedure:zero>

A Church numeral is a procedure that takes one argument, and that argument is itself another procedure that also takes one argument. The procedure zero represents the integer 0 by returning a procedure that applies its input procedure zero times. The Church numeral one should return a procedure that applies its input procedure once, two should return a procedure that applies its input procedure twice, and so on. This is how Church numerals represent integers, by applying their input procedure the exact number of times that the numerals are supposed to represent.

Our job in this exercise is to define one and two directly (not in terms of zero and add-1). We'll do that by using substitution to evaluate (add-1 zero) to see what the resulting procedural definition should be. We also need to give a direct definition for addition of two Church numerals (not in terms of repeated application of add-1).

Before we begin, we'll need some method for testing Church numerals to make sure they do what we expect them to do. We'll need a simple procedure to pass to each Church numeral as an argument so that we can see it gets evaluated the correct number of times. The inc procedure should do nicely. (You can replace inc with any procedure you like, just make it one that's easy to mentally calculate several repetitions of.)
(define (inc n)   (+ n 1))

We can use inc to show that zero does not call its input parameter, or more precisely, it calls its input procedure zero times.
> ((zero inc) 0)0> ((zero inc) 1)1> ((zero inc) 2)2

Now let's define one and two in the way that the book warns us not to, just to make sure they behave as we expect. I'll give the assigned implementations later.
> (define one (add-1 zero))> (define two (add-1 one))> ((one inc) 0)1> ((one inc) 1)2> ((two inc) 0)2> ((two inc) 1)3

So we can see that the procedure returned by one applies inc one time, and the procedure returned by two applies it twice. Now let's use substitution to evaluate (add-1 zero), giving us the direct definition of the Church numeral one.
(add-1 zero); retrieve the body of add-1 and substitute zero for its parameter n(lambda (f) (lambda (x) (f ((zero f) x)))); retrieve the body of zero and substitute(lambda (f) (lambda (x) (f ((lambda (x) x) x)))); simplify(lambda (f) (lambda (x) (f x)))

So we can define one directly as:
(define one   (lambda (f) (lambda (x) (f x))))

Next we can define two by evaluating (add-1 one) using exactly the same principles.
(add-1 one); retrieve the body of add-1 and substitute one for its parameter n(lambda (f) (lambda (x) (f ((one f) x)))); retrieve the body of one and substitute(lambda (f) (lambda (x) (f ((lambda (x) (f x)) x)))); simplify(lambda (f) (lambda (x) (f (f x))))

So two is defined directly as:
(define two   (lambda (f) (lambda (x) (f (f x)))))

Just as was explained earlier, the Church numeral one takes a procedure as an argument and returns a procedure that applies the input procedure once. The only difference in the Church numeral two is that it applies its input procedure twice.

Add these definitions in the Scheme interpreter and test them out the same as before.
> ((one inc) 0)1> ((one inc) 5)6> ((two inc) 3)5> ((two inc) 7)9

Now we need to figure out how to add two Church numerals. We can see from the definition of add-1 that all it does is takes a Church numeral, n, and wraps one additional function call around it.
(define (add-1 n)   (lambda (f) (lambda (x) (f ((n f) x)))))

We can implement Church numeral addition by using the same approach. We'll take two Church numerals m and n. Instead of wrapping n in one extra function call, we'll wrap it in m extra calls.
(define (add-church m n)   (lambda (f) (lambda (x) ((m f) ((n f) x)))))

We can now use add-church to define several more Church numerals for testing.
> (define three (add-church one two))> (define four (add-church two two))> (define seven (add-church three four))> ((three inc) 0)3> ((four inc) 0)4> ((seven inc) 0)7

Related:

For links to all of the SICP lecture notes and exercises that I've done so far, see The SICP Challenge.

Monday, October 25, 2010

SICP 2.5: Representing Pairs as a Product

From SICP section 2.1.3 What Is Meant by Data?

Exercise 2.5 asks us to show that we can represent pairs of non-negative integers using only numbers and arithmetic operations if we represent the pair a and b as the integer that is the product 2a3b. We're to give the corresponding definitions of the procedures cons, car, and cdr.

This exercise reminds me of the old adage that just because you can do something doesn't mean that you should. The implementations of cons, car, and cdr that follow are severely limited in that they can only join pairs of integers, not pairs of any type of data as we've seen before.

Regardless, here is what is meant by representing non-negative integers as the product 2a3b. Note that because 2 and 3 are both prime, and due to the fundamental theorem of arithmetic, any integer values that we insert for a and b will result in a unique value for the product 2a3b. Because the product is unique, we're able to get back the original values of a and b by just storing the product and remembering the rule we used to generate it.

The definition of cons is straightforward from the requirements using the built-in Scheme expt procedure.
(define (cons a b)  (* (expt 2 a)     (expt 3 b)))

But once we've combined two integers in this way, how do we separate them again? For example, if we evaluate (cons 5 6) we get a result of 23328. The corresponding implementation of car needs to take the value 23328 and tell us what that the original value of a was 5. We can do that by counting the number of times 23328 is evenly divisible by 2. Since 2 and 3 have no factors in common, once you divide all the 2s out of 23328 you'll be left with a power of 3. Since we're going to be doing the same thing for cdr, we'll define a general procedure that can be reused.

There's no easy way to find out how many times one number evenly divides another other than simply trying to divide by the number in a loop and testing for a remainder. If there was a quick formula that we could apply to get the answer in one step then prime factorization would be much easier than it is. We'll have to use an iterator to do this in as few steps as possible.
; count the number of times n is evenly divisible by d(define (num-divs n d)  (define (iter x result)    (if (= 0 (remainder x d))        (iter (/ x d) (+ 1 result))        result))  (iter n 0))

I tested this with the example values above to make sure it gives the correct results.
> (num-divs 23328 2)5> (num-divs 23328 3)6

Now we can define both car and cdr in terms of num-divs.
(define (car x)  (num-divs x 2))(define (cdr x)  (num-divs x 3))

Finally, we can use the axiom of pairs (from Lecture 2B) to show that our new definitions for cons, car, and cdr work together as they should.
> (car (cons 4 7))4> (cdr (cons 4 7))7

Related:

For links to all of the SICP lecture notes and exercises that I've done so far, see The SICP Challenge.

Thursday, October 21, 2010

SICP 2.4: Implementing cons, car, and cdr

From SICP section 2.1.3 What Is Meant by Data?

Exercise 2.4 gives us the following alternative procedual implementation for creating pairs.
(define (cons x y)  (lambda (m) (m x y)))(define (car z)  (z (lambda (p q) p)))

Using this implementation, we are told to verify that (car (cons x y)) yields x for any objects x and y using the substitution model from section 1.1.5.

Once we've done that, we need to write the corresponding definition of cdr.

Our first step to verifying that this implementation for cons and car work should be to put the code in a Scheme interpreter and see them work.
> (car (cons 2 3))2> (car (cons 15 "Hello"))15> (car (cons "Hi!" 42))"Hi!"

Now let's use the substitution model to show that the following always yields x
(car (cons x y))

First we retrieve the body of cons
(lambda (m) (m x y))

We could replace the formal parameters x and y with the arguments 2 and 3 (or any others that we choose) at this point, but I'm going to keep working with x and y. Let's substitute the body of cons.
(car (lambda (m) (m x y)))

Now we can retrieve the body of car and substitute it.
((z (lambda (p q) p)) (lambda (m) (m x y)))

The car procedure takes a procedure z as an argument and applies it to (lambda (p q) p), so there's one more substitution we need to do here before this step is really done. We need to take the second lambda in the expression above and replace z with it.
((lambda (m) (m x y)) (lambda (p q) p))

That might look scary, but it's just a procedure applied to another procedure. Since the procedure on the left takes one formal parameter, we can substitute the procedure on the right for that parameter.
((lambda (p q) p) x y)

Now it should be clear that this expression is a procedure that takes two parameters p and q, and passes two parameters to it. The procedure returns the first of the two parameters passed to it, so this expression simplifies to x.

The definition for cdr that corresponds to the above implementation of car is simply
(define (cdr z)  (z (lambda (p q) q)))

We can test it out the same way we originally tested the code provided in the text,
by running it in the interpreter.
>  (cdr (cons 2 3))3> (cdr (cons 15 "Hello"))"Hello"> (cdr (cons "Hi!" 42))42

Related:

For links to all of the SICP lecture notes and exercises that I've done so far, see The SICP Challenge.

Thursday, October 7, 2010

SICP 2.3: Rectangles in a plane

From SICP section 2.1.2 Abstraction Barriers

Exercise 2.3 asks us to build on the results of exercise 2.2 and implement a representation for rectangles in a plane. In addition to a constructor and selectors for a representation of a rectangle, we'll also need to implement procedures for computing the perimeter and area of a given rectangle. Once we've done that we'll need to implement a different representation for rectangles. The challenge is to design a system with suitable abstraction barriers so that the area and perimeter procedures will work with either rectangle representation.

First let's look at a few different ways to represent rectangles. To simplify things, we'll assume that the sides of the rectangle are to be perpendicular to the x- and y-axes of the coordinate plane.

The most obvious representation would be to combine four points (ignoring the fact that four points might not form a rectangle and just accepting any four points for this representation). We could easily implement this representation since we already have a representation for points in a plane.

Next, we could represent a rectangle as a single point along with a width and a height. This would make it very easy to calculate the perimeter and area of a given rectangle.

Another representation could be to store two opposite corners of the rectangle. This would give us just enough information to calculate the width and the height, from which we can calculate the perimeter and area.

You can probably think of several other representations such as storing all four segments that make up the sides of a rectangle, storing only two adjacent sides, or storing the segment that joins two opposite corners forming a diagonal. These would all work, but some require us to store more information than we really need.

The first implementation will be the third one pictured above where a rectangle is represented by two opposite corners. The constructor will simply join two points together. The selctors will return the width and height of the rectangle. The width and height are calculated by taking the absolute value of the difference between the x- and y-coordinates respectively.
; rectangle constructor; join two opposite corners(define (make-rect a b) (cons a b)); rectangle selectors(define (rect-width r)   (abs (- (x-point (car r)) (x-point (cdr r)))))(define (rect-height r)   (abs (- (y-point (car r)) (y-point (cdr r)))))

With that done, we can implement procedures for computing the perimeter and area of a rectangle.
(define (rect-perimeter r)   (* 2 (+ (rect-width r) (rect-height r))))(define (rect-area r)   (* (rect-width r) (rect-height r)))

We can test it out by defining two points, creating a rectangle, and displaying its perimeter and area.
> (define a (make-point 0 0))> (define b (make-point 2 10))> (define r (make-rect a b))> (display (rect-perimeter r))24> (display (rect-area r))20

The box-and-pointer diagram of the rectangle created above shows how the individual elements are stored. The rectangle itself is made up of two points (from the last exercise), each of which are themselves made up of an x and a y value. The rect-width and rect-height selectors are used to access these x and y values to calculate the width and height of the rectangle.

Now we can implement an alternate representation of a rectangle and show that we can use the same procedures for perimeter and area. The easiest will be the second pictured above, where we represent a rectangle by a single point and its width and height.
; rectangle constructor; combine a point, a width, and a height(define (make-rect a w h) (cons a (cons w h))); rectangle selectors(define (rect-width r)   (car (cdr r)))(define (rect-height r)   (cdr (cdr r)))

Using the new constructor and selectors we can test that the old rect-perimeter and rect-area procedures work unchanged.
> (define a (make-point 0 0))> (define r (make-rect a 2 10))> (display (rect-perimeter r))24> (display (rect-area r))20

The box-and-pointer diagram of this rectangle reveals that the elements are laid out exactly the same way internally, but the rectangle is different conceptually.

This time the rectangle is made up of a point, a width, and a height. The corresponding rect-width and rect-height procedures access their values directly rather than computing them.

Related:

For links to all of the SICP lecture notes and exercises that I've done so far, see The SICP Challenge.


text:
# Can you integrate internal energy to get original partition function? [closed]

If I have the hamiltonian of the simple harmonic oscillator

$$H = \frac{p^2}{2m} + \frac{1}{2} m \omega ^2 x^2$$

Then it's partition function is:

$$Z = \frac{k_b T}{\hbar \omega}$$

You can get the average energy using $$U = \frac{\partial \ln{Z}}{\partial \beta}$$

where $$\beta = k_b T$$. in 1D , $$U = kb * T$$

My question is, can you integrate U back up to obtain the original partition function, $$Z = \frac{k_b T}{\hbar \omega}$$? The closest I get is

$$\int U d\beta = \beta (T) - \beta(0) = k_b T - \hbar \omega$$

where $$\hbar \omega$$ is the zero point energy. The problem is that I then have to exponentiate to recover $$Z$$, and I get no where close to the original partition function. Any advice here?

## closed as unclear what you're asking by Aaron Stevens, ZeroTheHero, Gert, user191954, noahFeb 20 at 16:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Wow I'm an idiot. You're right, beta is 1/kbT – Drew Lilley Feb 15 at 1:53
• How are you getting that partition function? – Aaron Stevens Feb 15 at 2:55
• Just integrated through the p and x coordinates from - infinity to infinity – Drew Lilley Feb 15 at 4:02

As Aaron pointed out, I miswrote $$\beta$$. I should have $$\beta = \frac{1}{k_b T}$$ , and then it works out because:
$$- \int U d\beta = -\frac{1}{\beta} d\beta = \log{\frac{1}{\beta}} - \log{0} = \log{\frac{1}{ \beta \hbar \omega}} = \log{\frac{k_b T}{\hbar \omega}}$$

format: plain


text:
Unsure how to move a unit to a point

I've got a unit and a series of points in 3D space which approximate the path it's been given. However, I'm not sure where to go from there. The unit has certain physical constraints, like, it can only turn so fast, it can only accelerate so fast/decelerate so quickly, etc. I thought that this would be the simple part and finding the path would be the hard part, but apparently it's not. Here's the code I've written:

void Sim::Context::tick() {
auto t = 1.0f / Sim::ticks_per_sec;
std::for_each(players.begin(), players.end(), [&](std::unique_ptr<Sim::Player>& p) {
auto units = p->GetOwnedUnits();
std::for_each(units.begin(), units.end(), [&](Sim::Unit* unit) {
auto t = 1.0f / Sim::ticks_per_sec;
auto u = unit->GetVelocity();
auto a = unit->GetAcceleration();
if (u == 0 && a == 0)
return;
auto rotated_heading = Math::Vector(0, 0, 1) * unit->GetRotation();
auto bp = unit->GetBlueprint();
auto v = t * a + u;
if (v > bp->MaxVelocity) { // Do a more accurate lerp since we went over max velocity
// leerrrppppp
auto frac = (bp->MaxVelocity - u) * (t / (v - u));
auto total_increase = (u * t) + (0.5f * a * frac * frac) + (bp->MaxVelocity * (t - frac));
unit->SetPosition((rotated_heading * total_increase) + unit->GetPosition());
unit->GetOwningPlayer()->OnUnitPositionChange(unit, unit->GetPosition());
unit->SetVelocity(bp->MaxVelocity);
return;
}
auto increase_due_to_velocity = u * t;
auto increase_due_to_acceleration = 0.5f * a * t * t;
auto rotated_increase = rotated_heading * increase_due_to_acceleration;
unit->SetPosition(rotated_increase + unit->GetPosition());
unit->SetVelocity(v);
unit->GetOwningPlayer()->OnUnitPositionChange(unit, unit->GetPosition());
});
});
for(auto orderit = UnitOrders.begin();orderit != UnitOrders.end();) {
if (auto move = dynamic_cast<Move*>(orderit->second.get())) {
auto unit = orderit->first;
if (Math::Length(unit->GetPosition() - move->target) < 2) { // Close enough to target
orderit = UnitOrders.erase(orderit);
unit->SetAcceleration((-4 * unit->GetVelocity()) / (t * t)); // Let the setter implement the cap
continue;
}
auto path = GetPath(unit->GetPosition(), move->target, unit);
if (path.size() == 1) {
orderit++;
continue;
}
auto target_heading = Math::Normalize(path[1] - unit->GetPosition());
auto current_heading = Math::Normalize(Math::Vector(0, 0, 1) * unit->GetRotation());
auto axis = Math::Normalize(Math::Cross(current_heading, target_heading)); // Every path has at least two positions- a beginning and an end.
if (dot_value > 1)
dot_value = 1;
if (dot_value < -1)
dot_value = -1;
auto degrees_angle = std::acos(dot_value);
auto angle = glm::degrees(degrees_angle);
unit->SetAcceleration(unit->GetBlueprint()->MaxAcceleration);
orderit++;
continue;
}
if (std::abs(angle) > (unit->GetBlueprint()->MaxTurnRate * t)) {
angle = unit->GetBlueprint()->MaxTurnRate * t;
// Not done turning, slow down as much as possible.
unit->SetAcceleration((-4 * unit->GetVelocity()) / (t * t)); // Let the setter implement the cap
} else {
// Done turning- let's rock on.
unit->SetAcceleration(unit->GetBlueprint()->MaxAcceleration);
}
auto added_rotation = Math::RotateAxis(angle, axis);
auto total_rotation = unit->GetRotation() * added_rotation;
if (total_rotation.x != total_rotation.x)
__debugbreak();
unit->SetRotation(total_rotation);
orderit++;
}
}
}

Sometimes the units rotate to move backwards towards the target, instead of forwards.

Sometimes the units rotate to face a few degrees away from the target, backwards or forwards. The exact value of a "few" is quite variant.

The units turn to face the target, and then move towards it. This is by design, but what's not is the several-second gap in the middle- but only the first time the unit is ordered to move. After that it's perfectly responsive.

I don't really understand how this can go wrong- the logic is simple. As you can see, I split most of my processes up into many intermediate variables so that I can debug their values, but the truth is that when I look, they seem fine. For example, the target_heading and current_heading variables are equal (or close to) when the unit is facing the wrong direction, but moving in the right direction. This definitely puzzles me.

Any suggestions as to where I can look for the source of the errors?

• are you displaying the different vectors (look, goal, move vectors). in your problem space is strafing allowed, or is only rotation with forward/backward allowed? Apr 21, 2012 at 21:22
• @gardian06: Only forward movement, right now. Apr 22, 2012 at 11:57


text:
### Still have math questions?

Jesse is traveling up and down a stream in a kayak. He can paddle the kayak at n average rate of 5 mile/hour, and the round-trip is a total distance of 16 miles.When c is the speed of the current,this expression can be used to find the difference of the time it takes Jesse to travel upstream (against the current) and downstream (with the current). $$\frac { 8} { 5- x} - \frac { 8} { 5+ x}$$
$$\frac { 40+ 8c- 40+ 8c} { 25- c^ { 2} }$$=$$\frac { 16c} { 25- c^ { 2} }$$


text:
Definitions

# Least common multiple

In arithmetic and number theory, the least common multiple or lowest common multiple (lcm) or smallest common multiple of two integers a and b is the smallest positive integer that is a multiple of both a and b. Since it is a multiple, it can be divided by a and b without a remainder. If there is no such positive integer, e.g., if a = 0 or b = 0, then lcm(ab) is defined to be zero.)

The definition is sometimes generalized for more than two integers: The lowest common multiple of integers a1 ... an is the smallest positive integer that is a multiple of a1 ... an.

## Example

Multiples of 4 are:

4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, ...

(add 4 to each to get the next).

Multiples of 6 are:

6, 12, 18, 24, 30, 36, 42, 48, 54, ...

(add 6 to each to get the next).

Common multiples of 4 and 6 are numbers that these two lists share in common:

12, 24, 36, 48, ....

The smallest common multiple of 4 and 6 is therefore 12.

## Use in adding, subtracting, and comparing fractions

When adding or subtracting vulgar fractions, it is useful to find the least common multiple of the denominators, often called the lowest common denominator. For instance,

$\left\{2over21\right\}+\left\{1over6\right\}=\left\{4over42\right\}+\left\{7over42\right\}=\left\{11over42\right\},$

where the denominator 42 was used because it is the least common multiple of 6 and 21.

$operatorname\left\{lcm\right\}\left(a,b\right)=frac\left\{acdot b\right\}\left\{operatorname\left\{gcd\right\}\left(a,b\right)\right\}.$

Thus, the Euclidean algorithm for the gcd also gives us a fast algorithm for the lcm. To return to the example above,

$operatorname\left\{lcm\right\}\left(21,6\right)$
={21cdot6overoperatorname{gcd}(21,6)}

# {21cdot 6over 3}={126over 3}

42.

Because (ab)/c = a(b/c) = (a/c)b, one can calculate the lcm using the above formula more efficiently, by first exploiting the fact that b/c or a/c will be easier to calculate than the quotient of the product ab and c, because the fact that c is a factor of both a and b entails that in either fraction, a/c or b/c, one can completely cancel the c. This can be true whether the calculations are performed by a human, or a computer, which may have storage requirements on the variables a, b, c, where the limits may be 4-byte storage - calculating ab may cause an overflow, if storage space is not allocated properly.

Using this, we can then calculate the lcm by either using:

$operatorname\left\{lcm\right\}\left(a,b\right)=left\left(\left\{aoveroperatorname\left\{gcd\right\}\left(a,b\right)\right\}right\right)cdot b$

or

$operatorname\left\{lcm\right\}\left(a,b\right)=left\left(\left\{boveroperatorname\left\{gcd\right\}\left(a,b\right)\right\}right\right)cdot a$

Done this way, the previous example becomes:

$operatorname\left\{lcm\right\}\left(21,6\right)=\left\{21overoperatorname\left\{gcd\right\}\left(21,6\right)\right\}cdot6=\left\{21over3\right\}cdot6=7cdot6=42.$

Even if the numbers are large and not quickly factorable, the gcd can be calculated quickly with Euclid's algorithm.

## Finding least common multiples by prime factorization

The unique factorization theorem says that every positive integer number greater than 1 can be written in only one way as a product of prime numbers. The prime numbers can be considered as the atomic elements which, when combined together, make up a composite number.

For example:

$90 = 2^1 cdot 3^2 cdot 5^1 = 2 cdot 9 cdot 5. ,!$

Here we have the composite number 90 made up of one atom of the prime number 2, two atoms of the prime number 3 and one atom of the prime number 5.

This knowledge can be used to find the lcm of a set of numbers.

Example: Find the value of lcm(8,9,21).

First, factor out each number and express it as a product of prime number powers.

$8; , ; ,= 2^3 cdot 3^0 cdot 5^0 cdot 7^0 ,!$
$9; , ; ,= 2^0 cdot 3^2 cdot 5^0 cdot 7^0 ,!$
$21; ,= 2^0 cdot 3^1 cdot 5^0 cdot 7^1. ,!$

The lcm will be the product of multiplying the highest power in each prime factor category together. Out of the 4 prime factor categories 2, 3, 5, and 7, the highest powers from each are 23, 32, 50, and 71. Thus,

$operatorname\left\{lcm\right\}\left(8,9,21\right) = 2^3 cdot 3^2 cdot 5^0 cdot 7^1 = 8 cdot 9 cdot 1 cdot 7 = 504. ,!$

### Viewing this method via Venn diagrams

One can find the least common multiple of two numbers by using a Venn diagram as follows. Find the prime factorization of each of the two numbers. Put the prime factors into a Venn diagram with one circle for each of the two numbers, and all factors they share in common in the intersection. To find the LCM, just multiply all of the prime numbers in the diagram.

Here is an example:

48 = 2 × 2 × 2 × 2 × 3,
180 = 2 × 2 × 3 × 3 × 5,

and what they share in common is two "2"s and a "3":

Least common multiple = 2 × 2 × 2 × 2 × 3 × 3 × 5 = 720
Greatest common divisor = 2 × 2 × 3 = 12

This also works for the greatest common divisor (GCD), except that instead of multiplying all of the numbers in the Venn diagram, one multiplies only the prime factors that are in the intersection. Thus the GCD of 48 and 180 is 2 × 2 × 3 = 12.

## A third method

This method works as easily for finding the LCM of several integers.

Let there be a finite sequence of positive integers X = (x1, x2, ..., xn), n > 1. The algorithm proceeds in steps as follows: on each step m it examines and updates the sequence X(m) = (x1(m), x2(m), ..., xn(m)), X(1) = X. The purpose of the examination is to pick up the least (perhaps, one of many) element of the sequence X(m). Assuming xk0(m) is the selected element, the sequence X(m+1) is defined as

xk(m+1) = xk(m), kk0
xk0(m+1) = xk0(m) + xk0.

In other words, the least element is increased by the corresponding x whereas the rest of the elements pass from X(m) to X(m+1) unchanged.

The algorithm stops when all elements in sequence X(m) are equal. Their common value L is exactly LCM(X). (For a proof and an interactive simulation see reference below, Algorithm for Computing the LCM.)

## The lcm in commutative rings

The least common multiple can be defined generally over commutative rings as follows: Let a and b be elements of a commutative ring R. A common multiple of a and b is an element m of R such that both a and b divide m (i.e. there exist elements x and y of R such that ax = m and by = m). A least common multiple of a and b is a common multiple that is minimal in the sense that for any other common multiple n of a and b, m divides n.

In general, two elements in a commutative ring can have no least common multiple or more than one. However, any two least common multiples of the same pair of elements are associates. In a unique factorization domain, any two elements have a least common multiple. In a principal ideal domain, the least common multiple of a and b can be characterised as a generator of the intersection of the ideals generated by a and b (the intersection of a collection of ideals is always an ideal). In principal ideal domains, one can even talk about the least common multiple of arbitrary collections of elements: it is a generator of the intersection of the ideals generated by the elements of the collection.


text:
# Kinetic energy of rotated cylinders

## Homework Statement

You have a figure that is combined with three figures. Two solid cylinders and one rectangle in the middle. Like this: O[]O

The two cylinders is rotating and are not sliding, so the whole figure moves to the right. The rectangle is connected with the two cylinders. Both cylinders and the rectangle has each mass M, so it will be three masses: M1=M2=M3. Also the two cylinders has the same radius: r1=r2

Proof that the kinetic energy equals to 2Mv2 (k=2Mv2)

## Homework Equations

K=1/2Mv2=1/2M(r2w2)=1/2Iw2
I=1/2Mr2 (for solid cylinders)

## The Attempt at a Solution

2*1/2Iw2=2*1/2*1/2Mr2*w2=
2*1/2*1/2Mv2(energy of 2 cylinders)+1/2Mv2(energy of rectangel)=1Mv2

I dont understand why it should be 2...

Last edited:


text:
Interested in a PLAGIARISM-FREE paper based on these particular instructions?...with 100% confidentiality?

# An astronaut notices that a pendulum which took 2.45 [IMG: {\rm s}] for a complete cycle ofswing when the rocket was waiting on the launch pad takes1.26 [IMG: {\rm s}] for the same cycle of swingduring liftoff.What is the acceleration of therocket?(/Hint:/ Inside the rocket, it appears that [IMG: g] has increased.)

An astronaut notices that a pendulum which took 2.45 [IMG: {\rm s}] for a complete cycle ofswing when the rocket was waiting on the launch pad takes1.26 [IMG: {\rm s}] for the same cycle of swingduring liftoff.What is the acceleration of therocket?(/Hint:/ Inside the rocket, it appears that [IMG: g] has increased.)

Interested in a PLAGIARISM-FREE paper based on these particular instructions?...with 100% confidentiality?


text:
# Homework Help: Flux through Cube

1. Apr 27, 2010

### joemama69

1. The problem statement, all variables and given/known data
A cube has lengths L.

E(x) = {a(x+L)2i - (ayL)j where a is constant

Find the total Flux through the cube.

2. Relevant equations

3. The attempt at a solution

i know the flux is 0 through the z = 0 and z = L planes but the other sides and the top & bottom i am unsure how to find.

I am confused about the x,y, & L variables. It seems that x & y = L. When I integrae over the area am i doing a double integral for x & y from 0 to L

2. Apr 27, 2010

### HallsofIvy

There is NO "L variable", L is a constant, not a variable.

If you are integrating the flux over the top and bottom, yes, you are integrating x and y from 0 to L.
In particular, [/itex]\vec{n}dS[/itex] for the top and bottom are $\vec{k}dxdy$ and $-\vec{k}dxdy$ respectively. Since your given function has no $\vec{k}$ component, yes, the flux through those is 0.

Now consider the face x= 0, in the yz-plane. A unit (outward) normal is $-\vec{j}$
and $\vec{n}dS= -\vec{j}dydz$.

$E\cdot \vec{n}dS= -(x+ L) dydz$ but we are in the face x= 0 so that is just $-Ldy dz$ and the flux is $\int_{y=0}^L\int_{z=0}^L -L dy dz$ which is just -L times the area of the face, $-L^3$

On the face x= L, everything is the same except that the outward normal is $\vec{k}$ rather than $-\vec{k}$ and x+ L is now 2L. The flux through that face is $\int_{y= 0}^L \int_{z= 0}^L 2L dydz$ which is 2L times the area of the face, $2L(L^2)= 2L^3$.

On the face y= 0, in the xz-plane an (outward) normal is $-\vec{j}$ and $\vec{n}dS=-\vec{j}dxdz$.

$E\cdot\vec{n}dS= -a(0)L(-1) dxdz= 0$ so the flux through that face is 0.

Finally, on y= 1, the (outward) normal is $\vec{j}$ and $\vec{n}dS= \vec{j}dxdz$.

$E\cdot\vec{n}dS= a(L)(L) dxdz$ so the flux through that face is $\int_0^L\int_0^L aL^2 dxdz$ which is $aL^2$ times the area of the face: $(aL^2)(L^2)= aL^4$.

The flux through the entire region is the sum of those.


text:
# Jekyll Blogging

A Jekyll blog might be more complicated than other approaches but it also offers high flexibility and many features.

You can install it yourself with:

gem install jekyll

#### Note

OSX users might need to update their RubyGems:

sudo gem update -system

Additionally there are many other options:

• Using rdiscount or maruku
• Using pygments for syntax highlighting
• and this list could go on and on due to an amazing community support

For more information check the Jekyll Wiki

## Posting

Posting with Jekyll doesn’t involve a nice interface but is still a lot more simple than other methods.

You can post with Markdown like me or use an alternative. Editing gets even better if you are on a Mac and you use a nice markdown editor like Mou.

This is how my Jekyll folder tree looks like:

root/
_includes/
disqus.html
...
_layouts/
default.html
post.html
_plugins/
*.rb
_posts/
*.markdown
_site/
...
css/
styles.css
syntax.css
images/
github.png
javascript/
...

This might seem intimidating initially but after you’ve wrapped your head around it should be easy to understand.

### _includes

You can place any .html files in here and then include them anywhere you want with the following tag:

{ % include FILE_NAME.html % }

This is especially helpful if you want to example use Disqus in your blog. I’ve included the javascript code in a disqus.html file and whenever I want to use it I can simply include it with the above tag.

### _layouts

The files in here are going to be the basic building blocks of your site. At the top of this post:

layout: post

therefore i access the post.html file in _layouts. That post.html file is based of a default.html file. Therefore I don’t have to worry about any CSS or HTML after the site has been set up once.

### _posts

All your posts go in here. Look at the end of this post to see how I have written this post.

### Automatic Post Generation

thanks to Cody Krieger

Cody Krieger wrote a small little script:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 #!/usr/bin/env ruby # ********************************************* # Jekyll Post Generator Awesomeness # by Cody Krieger (http://codykrieger.com) # ********************************************* # Usage: # % ./newpost.rb POST NAME if ARGV.empty? or ARGV[0].downcase == "--help" or ARGV[0].downcase == "-h" puts <<-USAGE Usage: % ./newpost.rb POST NAME USAGE exit (ARGV.empty? ? 1 : 0) end class String # from ruby on rails (https://github.com/rails/rails) # activesupport/lib/active_support/inflector/transliterate.rb def parameterize(sep = '-') # replace accented chars with their ascii equivalents parameterized_string = self.dup # Turn unwanted chars into the separator parameterized_string.gsub!(/[^a-z0-9\-_]+/i, sep) unless sep.nil? || sep.empty? re_sep = Regexp.escape(sep) # No more than one of the separator in a row. parameterized_string.gsub!(/#{re_sep}{2,}/, sep) # Remove leading/trailing separator. parameterized_string.gsub!(/^#{re_sep}|#{re_sep}\$/i, '') end parameterized_string.downcase end end TEMPLATE = "template.markdown" POSTS_DIR = "_posts" # Get the title and use it to derive the new filename title = ARGV.join(" ") filename = "#{Time.now.strftime('%Y-%m-%d')}-#{title.parameterize}.markdown" filepath = File.join(POSTS_DIR, filename) # Load in the template and set the title post_text = File.read(TEMPLATE) post_text.gsub!('%%TITLE%%', title) # Write out the post post_file = File.open(filepath, 'w') post_file.puts post_text post_file.close puts "Successfully created file => #{filepath}"

Execution:

./newpost.rb Test Post

chmod u+x newpost.rb might be needed in order for the script to be executable.

The script is going to look for a file named template.markdown in you Jekyll root directory. This template is a basic Jekyll post that you have to fill in with your content.

---
layout: post
title: %%TITLE%%
published: true
---
Hello, Jekyll!

More on this can be found at Cody’s Blog

### $$\LaTeX$$

And if you are a Physics Lover like me you can easily embed Maxwell’s equations with LaTeX.

\begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}

or you can do some in-line implementations for example here : $$P(E) = {n \choose k} p^k (1-p)^{ n-k }$$ or if you have a long paragraph in another line $$0_{2} - 1_{2}$$ so you can make your posts - whatever they might be about - look really fancy and nice.

Using Latex like this takes a little more than just writing down normal latex code but I am going to cover that in another post. But basically I am just using the MathJax library with some configuration changes.

Check out my tutorial on how I did it!

$$\LaTeX$$ Math Magic

### Post Scriptum

The best thing is that you can just use Github Pages to deploy your blog:

git push origin master

It is as simple as that and you are all set!

Check out the original markdown of this post here.

## By Cecil Woebker

My name is Cecil Woebker. I am from Germany and spent the past 3 years living and studying in Boston, MA.

I do science during the day and develop or design at night. If you like my work, hire me.

Feel free to follow me on Twitter or to email me a question.


text:
JEE Main
Mathematics
Conic Sections
Previous Years Questions

MCQ (Single Correct Answer)

Let $$\mathrm{P}\left(x_{0}, y_{0}\right)$$ be the point on the hyperbola $$3 x^{2}-4 y^{2}=36$$, which is nearest to the line $$3 x+2 y=1$$. Then $$\... Let \mathrm{H} be the hyperbola, whose foci are (1 \pm \sqrt{2}, 0) and eccentricity is \sqrt{2}. Then the length of its latus rectum is : If the maximum distance of normal to the ellipse$$\frac{x^{2}}{4}+\frac{y^{2}}{b^{2}}=1, b ...
Let $$\mathrm{y}=f(x)$$ represent a parabola with focus $$\left(-\frac{1}{2}, 0\right)$$ and directrix $$y=-\frac{1}{2}$$. Then $$S=\left\{x \in \mat... Let A be a point on the x-axis. Common tangents are drawn from A to the curves x^2+y^2=8 and y^2=16 x. If one of these tangents touches the ... The parabolas : a x^2+2 b x+c y=0 and d x^2+2 e x+f y=0 intersect on the line y=1. If a, b, c, d, e, f are positive real numbers and a, b, c... If$$\mathrm{P}(\mathrm{h}, \mathrm{k})$$be a point on the parabola$$x=4 y^{2}$$, which is nearest to the point$$\mathrm{Q}(0,33)$$, then the dista... If the tangent at a point P on the parabola$$y^2=3x$$is parallel to the line$$x+2y=1$$and the tangents at the points Q and R on the ellipse$$\fra...
The equations of two sides of a variable triangle are $$x=0$$ and $$y=3$$, and its third side is a tangent to the parabola $$y^2=6x$$. The locus of it...
Let T and C respectively be the transverse and conjugate axes of the hyperbola $$16{x^2} - {y^2} + 64x + 4y + 44 = 0$$. Then the area of the region ab...
The distance of the point $$(6,-2\sqrt2)$$ from the common tangent $$\mathrm{y=mx+c,m > 0}$$, of the curves $$x=2y^2$$ and $$x=1+y^2$$ is :
The equations of the sides AB and AC of a triangle ABC are $$(\lambda+1)x+\lambda y=4$$ and $$\lambda x+(1-\lambda)y+\lambda=0$$ respectively. Its ver...
Let a tangent to the curve $$\mathrm{y^2=24x}$$ meet the curve $$xy = 2$$ at the points A and B. Then the mid points of such line segments AB lie on a...
Let a line L pass through the point of intersection of the lines $$b x+10 y-8=0$$ and $$2 x-3 y=0, \mathrm{~b} \in \mathbf{R}-\left\{\frac{4}{3}\right... Let the focal chord of the parabola$$\mathrm{P}: y^{2}=4 x$$along the line$$\mathrm{L}: y=\mathrm{m} x+\mathrm{c}, \mathrm{m}>0$$meet the parabola... Let the hyperbola$$H: \frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1$$pass through the point$$(2 \sqrt{2},-2 \sqrt{2})$$. A parabola is drawn whose focu... If the tangents drawn at the points$$\mathrm{P}$$and$$\mathrm{Q}$$on the parabola$$y^{2}=2 x-3$$intersect at the point$$R(0,1)$$, then the orth... If the length of the latus rectum of a parabola, whose focus is$$(a, a)$$and the tangent at its vertex is$$x+y=a$$, is 16, then$$|a|$$is equal to... Let$$P(a, b)$$be a point on the parabola$$y^{2}=8 x$$such that the tangent at$$P$$passes through the centre of the circle$$x^{2}+y^{2}-10 x-14 ...
Let $$\mathrm{P}$$ and $$\mathrm{Q}$$ be any points on the curves $$(x-1)^{2}+(y+1)^{2}=1$$ and $$y=x^{2}$$, respectively. The distance between $$P$$ ...
The acute angle between the pair of tangents drawn to the ellipse $$2 x^{2}+3 y^{2}=5$$ from the point $$(1,3)$$ is
The equation of a common tangent to the parabolas $$y=x^{2}$$ and $$y=-(x-2)^{2}$$ is
If the line $$x-1=0$$ is a directrix of the hyperbola $$k x^{2}-y^{2}=6$$, then the hyperbola passes through the point
Let the tangent drawn to the parabola $$y^{2}=24 x$$ at the point $$(\alpha, \beta)$$ is perpendicular to the line $$2 x+2 y=5$$. Then the normal to t...
If the ellipse $$\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$$ meets the line $$\frac{x}{7}+\frac{y}{2 \sqrt{6}}=1$$ on the $$x$$-axis and the line $$\f... The tangents at the points$$A(1,3)$$and$$B(1,-1)$$on the parabola$$y^{2}-2 x-2 y=1$$meet at the point$$P$$. Then the area (in unit$${ }^{2}$$... Let the foci of the ellipse$$\frac{x^{2}}{16}+\frac{y^{2}}{7}=1$$and the hyperbola$$\frac{x^{2}}{144}-\frac{y^{2}}{\alpha}=\frac{1}{25}$$coincide.... Let the eccentricity of the ellipse$${x^2} + {a^2}{y^2} = 25{a^2}$$be b times the eccentricity of the hyperbola$${x^2} - {a^2}{y^2} = 5$$, where a ... Let P : y2 = 4ax, a > 0 be a parabola with focus S. Let the tangents to the parabola P make an angle of$${\pi \over 4}$$with the line y = 3x + 5 to... Let PQ be a focal chord of the parabola y2 = 4x such that it subtends an angle of$${\pi \over 2}$$at the point (3, 0). Let the line segment PQ be a... Let a > 0, b > 0. Let e and l respectively be the eccentricity and length of the latus rectum of the hyperbola$${{{x^2}} \over {{a^2}}} - {{{y^2}} \o...
If vertex of a parabola is (2, $$-$$1) and the equation of its directrix is 4x $$-$$ 3y = 21, then the length of its latus rectum is :
Let the eccentricity of the hyperbola $$H:{{{x^2}} \over {{a^2}}} - {{{y^2}} \over {{b^2}}} = 1$$ be $$\sqrt {{5 \over 2}}$$ and length of its latus ...
If the equation of the parabola, whose vertex is at (5, 4) and the directrix is $$3x + y - 29 = 0$$, is $${x^2} + a{y^2} + bxy + cx + dy + k = 0$$, th...
Let the eccentricity of an ellipse $${{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} = 1$$, $$a > b$$, be $${1 \over 4}$$. If this ellipse passes th...
If m is the slope of a common tangent to the curves $${{{x^2}} \over {16}} + {{{y^2}} \over 9} = 1$$ and $${x^2} + {y^2} = 12$$, then $$12{m^2}$$ is e...
The locus of the mid point of the line segment joining the point (4, 3) and the points on the ellipse $${x^2} + 2{y^2} = 4$$ is an ellipse with eccent...
The normal to the hyperbola $${{{x^2}} \over {{a^2}}} - {{{y^2}} \over 9} = 1$$ at the point $$\left( {8,3\sqrt 3 } \right)$$ on it passes through the...
Let the normal at the point on the parabola y2 = 6x pass through the point (5, $$-$$8). If the tangent at P to the parabola intersects its directrix a...
If the line $$y = 4 + kx,\,k > 0$$, is the tangent to the parabola $$y = x - {x^2}$$ at the point P and V is the vertex of the parabola, then the slop...
The line y = x + 1 meets the ellipse $${{{x^2}} \over 4} + {{{y^2}} \over 2} = 1$$ at two points P and Q. If r is the radius of the circle with PQ as ...
If $$y = {m_1}x + {c_1}$$ and $$y = {m_2}x + {c_2}$$, $${m_1} \ne {m_2}$$ are two common tangents of circle $${x^2} + {y^2} = 2$$ and parabola y2 = x,...
Let $$x = 2t$$, $$y = {{{t^2}} \over 3}$$ be a conic. Let S be the focus and B be the point on the axis of the conic such that $$SA \bot BA$$, where A...
A particle is moving in the xy-plane along a curve C passing through the point (3, 3). The tangent to the curve C at the point P meets the x-axis at Q...
Let the maximum area of the triangle that can be inscribed in the ellipse $${{{x^2}} \over {{a^2}}} + {{{y^2}} \over 4} = 1,\,a > 2$$, having one of i...
Let x2 + y2 + Ax + By + C = 0 be a circle passing through (0, 6) and touching the parabola y = x2 at (2, 4). Then A + C is equal to ___________....
Consider the parabola with vertex $$\left( {{1 \over 2},{3 \over 4}} \right)$$ and the directrix $$y = {1 \over 2}$$. Let P be the point where the par...
Let $$\theta$$ be the acute angle between the tangents to the ellipse $${{{x^2}} \over 9} + {{{y^2}} \over 1} = 1$$ and the circle $${x^2} + {y^2} = 3... The locus of mid-points of the line segments joining ($$-$$3,$$-$$5) and the points on the ellipse$${{{x^2}} \over 4} + {{{y^2}} \over 9} = 1$$is : An angle of intersection of the curves,$${{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} = 1$$and x2 + y2 = ab, a > b, is :... The length of the latus rectum of a parabola, whose vertex and focus are on the positive x-axis at a distance R and S (> R) respectively from the o... The line$$12x\cos \theta + 5y\sin \theta = 60$$is tangent to which of the following curves? If two tangents drawn from a point P to the parabola y2 = 16(x$$-$$3) are at right angles, then the locus of point P is : A tangent and a normal are drawn at the point P(2,$$-$$4) on the parabola y2 = 8x, which meet the directrix of the parabola at the points A and B res... If x2 + 9y2$$-$$4x + 3 = 0, x, y$$\in$$R, then x and y respectively lie in the intervals : The point$$P\left( { - 2\sqrt 6 ,\sqrt 3 } \right)$$lies on the hyperbola$${{{x^2}} \over {{a^2}}} - {{{y^2}} \over {{b^2}}} = 1$$having eccentric... The locus of the mid points of the chords of the hyperbola x2$$-$$y2 = 4, which touch the parabola y2 = 8x, is : On the ellipse$${{{x^2}} \over 8} + {{{y^2}} \over 4} = 1$$let P be a point in the second quadrant such that the tangent at P to the ellipse is perp... A ray of light through (2, 1) is reflected at a point P on the y-axis and then passes through the point (5, 3). If this reflected ray is the directrix... Let P and Q be two distinct points on a circle which has center at C(2, 3) and which passes through origin O. If OC is perpendicular to both the line ... If a tangent to the ellipse x2 + 4y2 = 4 meets the tangents at the extremities of it major axis at B and C, then the circle with BC as diameter passes... The locus of the centroid of the triangle formed by any point P on the hyperbola$$16{x^2} - 9{y^2} + 32x + 36y - 164 = 0$$, and its foci is : Let a parabola b be such that its vertex and focus lie on the positive x-axis at a distance 2 and 4 units from the origin, respectively. If tangents a... Let an ellipse$$E:{{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} = 1$$,$${a^2} > {b^2}$$, passes through$$\left( {\sqrt {{3 \over 2}} ,1} \ri...
Let a line L : 2x + y = k, k > 0 be a tangent to the hyperbola x2 $$-$$ y2 = 3. If L is also a tangent to the parabola y2 = $$\alpha$$x, then $$\al... Let$${E_1}:{{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} = 1,a > b$$. Let E2 be another ellipse such that it touches the end points of major a... Let P be a variable point on the parabola$$y = 4{x^2} + 1$$. Then, the locus of the mid-point of the point P and the foot of the perpendicular drawn ... Let the tangent to the parabola S : y2 = 2x at the point P(2, 2) meet the x-axis at Q and normal at it meet the parabola S at the point R. Then the ar... Consider a hyperbola H : x2$$-$$2y2 = 4. Let the tangent at a point P(4,$${\sqrt 6 }$$) meet the x-axis at Q and latus rectum at R(x1, y1), x1 >... Let a tangent be drawn to the ellipse$${{{x^2}} \over {27}} + {y^2} = 1$$at$$(3\sqrt 3 \cos \theta ,\sin \theta )$$where$$0 \in \left( {0,{\pi \...
Let L be a tangent line to the parabola y2 = 4x $$-$$ 20 at (6, 2). If L is also a tangent to the ellipse $${{{x^2}} \over 2} + {{{y^2}} \over b} = 1... If the points of intersections of the ellipse$${{{x^2}} \over {16}} + {{{y^2}} \over {{b^2}}} = 1$$and the circle x2 + y2 = 4b, b > 4 lie on the ... Let C be the locus of the mirror image of a point on the parabola y2 = 4x with respect to the line y = x. Then the equation of tangent to C at P(2, 1)... If the three normals drawn to the parabola, y2 = 2x pass through the point (a, 0) a$$\ne$$0, then 'a' must be greater than : The locus of the midpoints of the chord of the circle, x2 + y2 = 25 which is tangent to the hyperbola,$${{{x^2}} \over 9} - {{{y^2}} \over {16}} = 1$... The shortest distance between the line x $$-$$ y = 1 and the curve x2 = 2y is : A hyperbola passes through the foci of the ellipse $${{{x^2}} \over {25}} + {{{y^2}} \over {16}} = 1$$ and its transverse and conjugate axes coincide ... A tangent is drawn to the parabola y2 = 6x which is perpendicular to the line 2x + y = 1. Which of the following points does NOT lie on it? If P is a point on the parabola y = x2 + 4 which is closest to the straight line y = 4x $$-$$ 1, then the co-ordinates of P are : The locus of the mid-point of the line segment joining the focus of the parabola y2 = 4ax to a moving point of the parabola, is another parabola whose... If the normal at an end of a latus rectum of an ellipse passes through an extremity of the minor axis, then the eccentricity e of the ellipse satisfie... The centre of the circle passing through the point (0, 1) and touching the parabola y = x2 at the point (2, 4) is : Let L1 be a tangent to the parabola y2 = 4(x + 1) and L2 be a tangent to the parabola y2 = 8(x + 2) such that L1 and L2 intersect at right angles.... Which of the following points lies on the locus of the foot of perpedicular drawn upon any tangent to the ellipse, $${{{x^2}} \over 4} + {{{y^2}} \ove... If the line y = mx + c is a common tangent to the hyperbola$${{{x^2}} \over {100}} - {{{y^2}} \over {64}} = 1$$and the circle x2 + y2 = 36, then w... If the common tangent to the parabolas, y2 = 4x and x2 = 4y also touches the circle, x2 + y2 = c2, then c is equal to :... If the co-ordinates of two points A and B are$$\left( {\sqrt 7 ,0} \right)$$and$$\left( { - \sqrt 7 ,0} \right)$$respectively and P is any point o... Let x = 4 be a directrix to an ellipse whose centre is at the origin and its eccentricity is$${1 \over 2}$$. If P(1,$$\beta $$),$$\beta $$> 0 i... Let P(3, 3) be a point on the hyperbola,$${{{x^2}} \over {{a^2}}} - {{{y^2}} \over {{b^2}}} = 1$$. If the normal to it at P intersects the x-axis at ... Let$${{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} = 1$$(a > b) be a given ellipse, length of whose latus rectum is 10. If its eccentricity i... Let the latus ractum of the parabola y2 = 4x be the common chord to the circles C1 and C2 each of them having radius 2$$\sqrt 5 $$. Then, the distan... Let e1 and e2 be the eccentricities of the ellipse,$${{{x^2}} \over {25}} + {{{y^2}} \over {{b^2}}} = 1$$(b < 5) and the hyperbola,$${{{x^2}} \... A hyperbola having the transverse axis of length $$\sqrt 2$$ has the same foci as that of the ellipse 3x2 + 4y2 = 12, then this hyperbola does not pa... Let P be a point on the parabola, y2 = 12x and N be the foot of the perpendicular drawn from P on the axis of the parabola. A line is now drawn throu... The area (in sq. units) of an equilateral triangle inscribed in the parabola y2 = 8x, with one of its vertices on the vertex of this parabola, is :... For some $$\theta \in \left( {0,{\pi \over 2}} \right)$$, if the eccentricity of the hyperbola, x2–y2sec2$$\theta$$ = 10 is $$\sqrt 5$$ times the ... A line parallel to the straight line 2x – y = 0 is tangent to the hyperbola $${{{x^2}} \over 4} - {{{y^2}} \over 2} = 1$$ at the point $$\left( {{x_1... The length of the minor axis (along y-axis) of an ellipse in the standard form is$${4 \over {\sqrt 3 }}$$. If this ellipse touches the line, x + 6y =... If one end of a focal chord AB of the parabola y2 = 8x is at$$A\left( {{1 \over 2}, - 2} \right)$$, then the equation of the tangent to it at B is :... If e1 and e2 are the eccentricities of the ellipse,$${{{x^2}} \over {18}} + {{{y^2}} \over 4} = 1$$and the hyperbola,$${{{x^2}} \over 9} - {{{y^2}}... The length of the perpendicular from the origin, on the normal to the curve, x2 + 2xy – 3y2 = 0 at the point (2,2) is If a hyperbola passes through the point P(10, 16) and it has vertices at (± 6, 0), then the equation of the normal to it at P is Let the line y = mx and the ellipse 2x2 + y2 = 1 intersect at a ponit P in the first quadrant. If the normal to this ellipse at P meets the co-ordinat... The locus of a point which divides the line segment joining the point (0, –1) and a point on the parabola, x2 = 4y, internally in the ratio 1 : 2, is ... If 3x + 4y = 12$$\sqrt 2$$ is a tangent to the ellipse $${{{x^2}} \over {{a^2}}} + {{{y^2}} \over 9} = 1$$ for some $$a$$ $$\in$$ R, then the dista... If y = mx + 4 is a tangent to both the parabolas, y2 = 4x and x2 = 2by, then b is equal to: If the distance between the foci of an ellipse is 6 and the distance between its directrices is 12, then the length of its latus rectum is: The equation of common tangent to the curves y2 = 16x and xy = –4, is : The tangents to the curve y = (x – 2)2 – 1 at its points of intersection with the line x – y = 3, intersect at the point : An ellipse, with foci at (0, 2) and (0, –2) and minor axis of length 4, passes through which of the following points? Let P be the point of intersection of the common tangents to the parabola y2 = 12x and the hyperbola 8x2 – y2 = 8. If S and S' denote the foci of th... If the normal to the ellipse 3x2 + 4y2 = 12 at a point P on it is parallel to the line, 2x + y = 4 and the tangent to the ellipse at P passes throug... If 5x + 9 = 0 is the directrix of the hyperbola 16x2 – 9y2 = 144, then its corresponding focus is : If the line ax + y = c, touches both the curves x2 + y2 = 1 and y2 = 4$$\sqrt 2$$x , then |c| is equal to : The tangent and normal to the ellipse 3x2 + 5y2 = 32 at the point P(2, 2) meet the x-axis at Q and R, respectively. Then the area (in sq. units) of ... If a directrix of a hyperbola centred at the origin and passing through the point (4, –2$$\sqrt 3$$ ) is 5x = 4$$\sqrt 5$$ and its eccentricity is e... If the line x – 2y = 12 is tangent to the ellipse $${{{x^2}} \over {{a^2}}} + {{{y^2}} \over {{b^2}}} = 1$$ at the point $$\left( {3, - {9 \over 2}} \... If the tangent to the parabola y2 = x at a point ($$\alpha $$,$$\beta $$), ($$\beta $$> 0) is also a tangent to the ellipse, x2 + 2y2 = 1, then ... The area (in sq. units) of the smaller of the two circles that touch the parabola, y2 = 4x at the point (1, 2) and the x-axis is :- If the line y = mx + 7$$\sqrt 3 $$is normal to the hyperbola$${{{x^2}} \over {24}} - {{{y^2}} \over {18}} = 1$$, then a value of m is If one end of a focal chord of the parabola, y2 = 16x is at (1, 4), then the length of this focal chord is If the eccentricity of the standard hyperbola passing through the point (4,6) is 2, then the equation of the tangent to the hyperbola at (4,6) is The tangent to the parabola y2 = 4x at the point where it intersects the circle x2 + y2 = 5 in the first quadrant, passes through the point : ... In an ellipse, with centre at the origin, if the difference of the lengths of major axis and minor axis is 10 and one of the foci is at (0,5$$\sqrt 3$...
The shortest distance between the line y = x and the curve y2 = x – 2 is :
If the tangents on the ellipse 4x2 + y2 = 8 at the points (1, 2) and (a, b) are perpendicular to each other, then a2 is equal to : ...
The equation of a tangent to the parabola, x2 = 8y, which makes an angle $$\theta$$ with the positive directions of x-axis, is :
Let S and S' be the foci of an ellipse and B be any one of the extremities of its minor axis. If $$\Delta$$S'BS is a right angled triangle with right...
The maximum area (in sq. units) of a rectangle having its base on the x-axis and its other two vertices on the parabola, y = 12 – x2 such that the re...
If the vertices of a hyperbola be at (–2, 0) and (2, 0) and one of its foci be at (–3, 0), then which one of the following points does not lie on this...
Let P(4, –4) and Q(9, 6) be two points on the parabola, y2 = 4x and let x be any point on the arc POQ of this parabola, where O is the vertex of this ...
If a hyperbola has length of its conjugate axis equal to 5 and the distance between its foci is 13, then the eccentricity of the hyperbola is :
Let the length of the latus rectum of an ellipse with its major axis along x-axis and centre at the origin, be 8. If the distance between the foci of ...
A circle cuts a chord of length 4a on the x-axis and passes through a point on the y-axis, distant 2b from the origin. Then the locus of the centre of...
If the area of the triangle whose one vertex is at the vertex of the parabola, y2 + 4(x – a2) = 0 and the othertwo vertices are the points of intersec...
Equation of a common tangent to the parabola y2 = 4x and the hyperbola xy = 2 is
If tangents are drawn to the ellipse x2 + 2y2 = 2 at all points on the ellipse other than its four vertices then the mid points of the tangents inte...
The length of the chord of the parabola x2 $$=$$ 4y having equation x – $$\sqrt 2 y + 4\sqrt 2 = 0$$  is -
Let S = $$\left\{ {\left( {x,y} \right) \in {R^2}:{{{y^2}} \over {1 + r}} - {{{x^2}} \over {1 - r}}} \right\};r \ne \pm 1.$$ Then S represents
If the parabolas y2 = 4b(x – c) and y2 = 8ax have a common normal, then which on of the following is a valid choice for the ordered triad (a, b, c) ...
The equation of a tangent to the hyperbola 4x2 – 5y2 = 20 parallel to the line x – y = 2 is -
Let A(4, $$-$$ 4) and B(9, 6) be points on the parabola, y2 = 4x. Let C be chosen on the arc AOB of the parabola, where O is the origin, such that the...
A hyperbola has its centre at the origin, passes through the point (4, 2) and has transverse axis of length 4 along the x-axis. Then the eccentricity ...
Axis of a parabola lies along x-axis. If its vertex and focus are at distances 2 and 4 respectively from the origin, on the positive x-axis then which...
Let $$0 < \theta < {\pi \over 2}$$. If the eccentricity of the hyperbola $${{{x^2}} \over {{{\cos }^2}\theta }} - {{{y^2}} \over {{{\sin }^2}... Equation of a common tangent to the circle, x2 + y2 – 6x = 0 and the parabola, y2 = 4x is : If$$\theta $$denotes the acute angle between the curves, y = 10 – x2 and y = 2 + x2 at a point of their intersection, the |tan$$\theta $$| is equa... The locus of the point of intersection of the lines,$$\sqrt 2 x - y + 4\sqrt 2 k = 0$$and$$\sqrt 2 k\,x + k\,y - 4\sqrt 2 = 0$$(k is any non-zero... Let P be a point on the parabola, x2 = 4y. If the distance of P from the center of the circle, x2 + y2 + 6x + 8 = 0 is minimum, then the equation of ... If the length of the latus rectum of an ellipse is 4 units and the distance between a focus an its nearest vertex on the major axis is$${3 \over 2}$$... Tangents are drawn to the hyperbola 4x2 - y2 = 36 at the points P and Q. If these tangents intersect at the point T(0, 3) then the area (in sq. units)... Tangent and normal are drawn at P(16, 16) on the parabola y2 = 16x, which intersect the axis of the parabola at A and B, respectively. If C is the cen... Tangents drawn from the point ($$-$$8, 0) to the parabola y2 = 8x touch the parabola at$$P$$and$$Q.$$If F is the focus of the parabola, then the a... A normal to the hyperbola, 4x2$$-$$9y2 = 36 meets the co-ordinate axes$$x$$and y at A and B, respectively. If the parallelogram OABP (O being the ... If the tangents drawn to the hyperbola 4y2 = x2 + 1 intersect the co-ordinate axes at the distinct points A and B then the locus of the mid point of A... Two parabolas with a common vertex and with axes along x-axis and$$y$$-axis, respectively intersect each other in the first quadrant. If the length o... If y = mx + c is the normal at a point on the parabola y2 = 8x whose focal distance is 8 units, then$$\left| c \right|$$is equal to : The eccentricity of an ellipse having centre at the origin, axes along the co-ordinate axes and passing through the points (4, −1) and (−2, 2) is : Let z$$ \in $$C, the set of complex numbers. Then the equation, 2|z + 3i|$$-$$|z$$-$$i| = 0 represents : The locus of the point of intersection of the straight lines, tx$$-$$2y$$-$$3t = 0 x$$-$$2ty + 3 = 0 (t$$ \in $$R), is : ... If two parallel chords of a circle, having diameter 4units, lie on the opposite sides of the center and subtend angles$${\cos ^{ - 1}}\left( {{1 \ove...
If the common tangents to the parabola, x2 = 4y and the circle, x2 + y2 = 4 intersect at the point P, then the distance of P from the origin, is : ...
Consider an ellipse, whose center is at the origin and its major axis is along the x-axis. If its eccentricity is $${3 \over 5}$$ and the distance bet...
A hyperbola passes through the point P$$\left( {\sqrt 2 ,\sqrt 3 } \right)$$ and has foci at $$\left( { \pm 2,0} \right)$$. Then the tangent to this h...
The eccentricity of an ellipse whose centre is at the origin is $${1 \over 2}$$. If one of its directrices is x = – 4, then the equation of the normal...
P and Q are two distinct points on the parabola, y2 = 4x, with parameters t and t1 respectively. If the normal at P passes through Q, then the minimum...
A hyperbola whose transverse axis is along the major axis of the conic, $${{{x^2}} \over 3} + {{{y^2}} \over 4} = 4$$ and has vertices at the foci of ...
If the tangent at a point on the ellipse $${{{x^2}} \over {27}} + {{{y^2}} \over 3} = 1$$ meets the coordinate axes at A and B, and O is the origin, t...
Let a and b respectively be the semitransverse and semi-conjugate axes of a hyperbola whose eccentricity satisfies the equation 9e2 − 18e + 5 = 0. If ...
The eccentricity of the hyperbola whose length of the latus rectum is equal to $$8$$ and the length of its conjugate axis is equal to half of the dist...
Let $$P$$ be the point on the parabola, $${{y^2} = 8x}$$ which is at a minimum distance from the centre $$C$$ of the circle, $${x^2} + {\left( {y + 6}... The normal to the curve,$${x^2} + 2xy - 3{y^2} = 0$$, at$$(1,1)$$Let$$O$$be the vertex and$$Q$$be any point on the parabola,$${{x^2} = 8y}$$. If the point$$P$$divides the line segment$$OQ$$internally in the... The area (in sq. units) of the quadrilateral formed by the tangents at the end points of the latera recta to the ellipse$${{{x^2}} \over 9} + {{{y^2}...
The locus of the foot of perpendicular drawn from the centre of the ellipse $${x^2} + 3{y^2} = 6$$ on any tangent to it is
The slope of the line touching both the parabolas $${y^2} = 4x$$ and $${x^2} = - 32y$$ is
The equation of the circle passing through the foci of the ellipse $${{{x^2}} \over {16}} + {{{y^2}} \over 9} = 1$$, and having centre at $$(0,3)$$ is...
Given : A circle, $$2{x^2} + 2{y^2} = 5$$ and a parabola, $${y^2} = 4\sqrt 5 x$$. Statement-1 : An equation of a common tangent to these curves is $$... STATEMENT-1 : An equation of a common tangent to the parabola$${y^2} = 16\sqrt 3 x$$and the ellipse$$2{x^2} + {y^2} = 4$$is$$y = 2x + 2\sqrt 3 $$... An ellipse is drawn by taking a diameter of thec circle$${\left( {x - 1} \right)^2} + {y^2} = 1$$as its semi-minor axis and a diameter of the circle... Equation of the ellipse whose axes of coordinates and which passes through the point$$(-3,1)$$and has eccentricity$$\sqrt {{2 \over 5}} $$is If two tangents drawn from a point$$P$$to the parabola$${y^2} = 4x$$are at right angles, then the locus of$$P$$is The ellipse$${x^2} + 4{y^2} = 4is inscribed in a rectangle aligned with the coordinate axex, which in turn is inscribed in another ellipse that pa... A focus of an ellipse is at the origin. The directrix is the linex=4$$and the eccentricity is$${{1 \over 2}}$$. Then the length of the semi-major... A parabola has the origin as its focus and the line$$x=2$$as the directrix. Then the vertex of the parabola is at For the Hyperbola$${{{x^2}} \over {{{\cos }^2}\alpha }} - {{{y^2}} \over {{{\sin }^2}\alpha }} = 1$$, which of the following remains constant when ... The equation of a tangent to the parabola$${y^2} = 8x$$is$$y=x+2$$. The point on this line from which the other tangent to the parabola is perpendi... The normal to a curve at$$P(x,y)$$meets the$$x$$-axis at$$G$$. If the distance of$$G$$from the origin is twice the abscissa of$$P$$, then the c... In the ellipse, the distance between its foci is$$6$$and minor axis is$$8$$. Then its eccentricity is The locus of the vertices of the family of parabolas$$y = {{{a^3}{x^2}} \over 3} + {{{a^2}x} \over 2} - 2a$$is Angle between the tangents to the curve$$y = {x^2} - 5x + 6$$at the points$$(2,0)$$and$$(3,0)$$is An ellipse has$$OB$$as semi minor axis,$$F$$and$$F$$' its focii and theangle$$FBF$$' is a right angle. Then the eccentricity of the ellipse is The locus of a point$$P\left( {\alpha ,\beta } \right)$$moving under the condition that the line$$y = \alpha x + \beta $$is tangent to the hyperbo... Let$$P$$be the point$$(1, 0)$$and$$Q$$a point on the parabola$${y^2} = 8x$$. The locus of mid point of$$PQ$$is If$$a \ne 0$$and the line$$2bx+3cy+4d=0$$passes through the points of intersection of the parabolas$${y^2} = 4ax$$and$${x^2} = 4ay$$, then The eccentricity of an ellipse, with its centre at the origin, is$${1 \over 2}$$. If one of the directrices is$$x=4$$, then the equation of the elli... The normal at the point$$\left( {bt_1^2,2b{t_1}} \right)$$on a parabola meets the parabola again in the point$$\left( {bt_2^2,2b{t_2}} \right)$$, th... The foci of yhe ellipse$${{{x^2}} \over {16}} + {{{y^2}} \over {{b^2}}} = 1$$and the hyperbola$${{{x^2}} \over {144}} - {{{y^2}} \over {81}} = {1 \...
Two common tangents to the circle $${x^2} + {y^2} = 2{a^2}$$ and parabola $${y^2} = 8ax$$ are

Numerical

If the $$x$$-intercept of a focal chord of the parabola $$y^{2}=8x+4y+4$$ is 3, then the length of this chord is equal to ____________.
The line $$x=8$$ is the directrix of the ellipse $$\mathrm{E}:\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$$ with the corresponding focus $$(2,0)$$. If t...
A triangle is formed by the tangents at the point (2, 2) on the curves $$y^2=2x$$ and $$x^2+y^2=4x$$, and the line $$x+y+2=0$$. If $$r$$ is the radius...
The vertices of a hyperbola H are ($$\pm$$ 6, 0) and its eccentricity is $${{\sqrt 5 } \over 2}$$. Let N be the normal to H at a point in the first qu...
Let C be the largest circle centred at (2, 0) and inscribed in the ellipse $${{{x^2}} \over {36}} + {{{y^2}} \over {16}} = 1$$. If (1, $$\alpha$$) lie...
Let a tangent to the curve $$9{x^2} + 16{y^2} = 144$$ intersect the coordinate axes at the points A and B. Then, the minimum length of the line segmen...
Let the tangents at the points $$\mathrm{P}$$ and $$\mathrm{Q}$$ on the ellipse $$\frac{x^{2}}{2}+\frac{y^{2}}{4}=1$$ meet at the point $$R(\sqrt{2}, ... Two tangent lines$$l_{1}$$and$$l_{2}$$are drawn from the point$$(2,0)$$to the parabola$$2 \mathrm{y}^{2}=-x$$. If the lines$$l_{1}$$and$$l_{...
For the hyperbola $$\mathrm{H}: x^{2}-y^{2}=1$$ and the ellipse $$\mathrm{E}: \frac{x^{2}}{\mathrm{a}^{2}}+\frac{y^{2}}{\mathrm{~b}^{2}}=1$$, a $$>\ma... A common tangent$$\mathrm{T}$$to the curves$$\mathrm{C}_{1}: \frac{x^{2}}{4}+\frac{y^{2}}{9}=1$$and$$C_{2}: \frac{x^{2}}{42}-\frac{y^{2}}{143}=1$... An ellipse $$E: \frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$$ passes through the vertices of the hyperbola $$H: \frac{x^{2}}{49}-\frac{y^{2}}{64}=-1$$.... If the length of the latus rectum of the ellipse $$x^{2}+4 y^{2}+2 x+8 y-\lambda=0$$ is 4 , and $$l$$ is the length of its major axis, then $$\lambda+... Let the equation of two diameters of a circle$$x^{2}+y^{2}-2 x+2 f y+1=0$$be$$2 p x-y=1$$and$$2 x+p y=4 p$$. Then the slope m$$ \in (0, \in... The sum of diameters of the circles that touch (i) the parabola $$75 x^{2}=64(5 y-3)$$ at the point $$\left(\frac{8}{5}, \frac{6}{5}\right)$$ and (ii)... Let PQ be a focal chord of length 6.25 units of the parabola y2 = 4x. If O is the vertex of the parabola, then 10 times the area (in sq. units) of $$\... Let$$H:{{{x^2}} \over {{a^2}}} - {{{y^2}} \over {{b^2}}} = 1$$, a > 0, b > 0, be a hyperbola such that the sum of lengths of the transverse and the c... A circle of radius 2 unit passes through the vertex and the focus of the parabola y2 = 2x and touches the parabola$$y = {\left( {x - {1 \over 4}} \ri... Let a line L1 be tangent to the hyperbola $${{{x^2}} \over {16}} - {{{y^2}} \over 4} = 1$$ and let L2 be the line passing through the origin and perpe... Let the common tangents to the curves $$4({x^2} + {y^2}) = 9$$ and $${y^2} = 4x$$ intersect at the point Q. Let an ellipse, centered at the origin O, ... Let the eccentricity of the hyperbola $${{{x^2}} \over {{a^2}}} - {{{y^2}} \over {{b^2}}} = 1$$ be $${5 \over 4}$$. If the equation of the normal at t... Let the hyperbola $$H:{{{x^2}} \over {{a^2}}} - {y^2} = 1$$ and the ellipse $$E:3{x^2} + 4{y^2} = 12$$ be such that the length of latus rectum of H is... Let P1 be a parabola with vertex (3, 2) and focus (4, 4) and P2 be its mirror image with respect to the line x + 2y = 6. Then the directrix of P2 is x... If two tangents drawn from a point ($$\alpha$$, $$\beta$$) lying on the ellipse 25x2 + 4y2 = 1 to the parabola y2 = 4x are such that the slope of one ... A tangent line L is drawn at the point (2, $$-$$4) on the parabola y2 = 8x. If the line L is also tangent to the circle x2 + y2 = a, then 'a' is equa... Let A (sec$$\theta$$, 2tan$$\theta$$) and B (sec$$\phi$$, 2tan$$\phi$$), where $$\theta$$ + $$\phi$$ = $$\pi$$/2, be two points on the hyperbola 2x2$...
If the minimum area of the triangle formed by a tangent to the ellipse $${{{x^2}} \over {{b^2}}} + {{{y^2}} \over {4{a^2}}} = 1$$ and the co-ordinate ...
Let E be an ellipse whose axes are parallel to the co-ordinates axes, having its center at (3, $$-$$4), one focus at (4, $$-$$4) and one vertex at (5,...
If the point on the curve y2 = 6x, nearest to the point $$\left( {3,{3 \over 2}} \right)$$ is ($$\alpha$$, $$\beta$$), then 2($$\alpha$$ + $$\beta$$) ...
Let y = mx + c, m > 0 be the focal chord of y2 = $$-$$ 64x, which is tangent to (x + 10)2 + y2 = 4. Then, the value of 4$$\sqrt 2$$ (m + c) is equ...
Let L be a common tangent line to the curves 4x2 + 9y2 = 36 and (2x)2 + (2y)2 = 31. Then the square of the slope of the line L is __________....
A line is a common tangent to the circle (x $$-$$ 3)2 + y2 = 9 and the parabola y2 = 4x. If the two points of contact (a, b) and (c, d) are distinct a...
The locus of the point of intersection of the lines $$\left( {\sqrt 3 } \right)kx + ky - 4\sqrt 3 = 0$$ and \sqrt 3 x - y - 4\left( {\sqrt 3 } \rig...
If the tangent to the curve, y = ex at a point (c, ec) and the normal to the parabola, y2 = 4x at the point (1, 2) intersect at the same point on the...
Let a line y = mx (m > 0) intersect the parabola, y2 = x at a point P, other than the origin. Let the tangent to it at P meet the x-axis at the poi...
EXAM MAP
Joint Entrance Examination
JEE MainJEE AdvancedWB JEE
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Medical
NEET
© ExamGOAL 2023


text:
JOIN HERE

COS2601

You are here: Main Page > Unisa Modules > Computer Science > COS2601

Online Dating in South Africa

Theoretical computer science 2

Introduction

Theoretical Computer Science 2 is a module that allows you to study a class of theoretical machines known as Finite Automata (FA). These FA's can be used to recognize symbol patterns like binary sequences eg. '10101011100111' or character strings eg. 'abcdefgh'. These sequences or strings are called languages which are fed to these machines and either accepted or rejected.

There are various applications for such theoretical machines in Computer Science. Typical applications are the development of Communications protocols and Cryptography.

The prerequisites for this module are either COS1501 or MAT2612.
COS101S provides a natural introduction to the topics presented here. There are also similarities with MAT2612 in a few significant areas.

The Unisa syllabus

1. Background
2. Languages
3. Recursive Definitions
4. Regular Expressions
5. Finite Automata
6. Transition Graphs
7. Kleene's Theorem
8. Finite Automata with Output
9. Regular Languages
10. Nonregular Languages
11. Decidability

The COS2601 textbook

Prescribed textbook

 ISBN 9780471137726 Title: Introduction to Computer Theory Author: Daniel I. A. Cohen Edition: 2nd Publisher: John Wiley and Sons Year published: 1996 Year prescribed: 2010

Quotes from the textbook

"...but what is far less clear is exactly what ϕ* should mean.
We shall avoid this philosophical crisis by never using this symbolism and avoiding those who do."
-- Cohen p. 37, Chapter 4 (Regular expressions)

The COS2601 exam

Past exam papers

The Exam in May 2011

• Question 1

Fairly Simple, Set theory. If you went over your MCQ of Tutorial letter 101, you would've been fine.

• Question 2:
Given the alphabet $\left\{a, b\right\}$
a) Give the universal set,
b) the generator(s),
c) a function on the universal set,
d) write the definition of the language EVENAB where the words are of even length and which do not contain the substring ab.
• Question 3:
a) Give the recursive definition of $P$ of all positive integers greater than 2,
b) formulate the induction principle,
c) apply the induction principle to prove a given equation.
• Question 4:
You had to decide whether two regular expressions are similar or equivalent, if not you had to supply a counter example.
• Question 5:
Build an FA that meets certain criteria.
• Question 6:
Use Kleene's theorem to convert a Transition Graph into a regular expression.
• Question 7:
Build an FA which is the concatenation of $FA_1$ and $FA_2$ ($r_1 + r_2$)
• Question 8:
Simplify a given FA with a largish number of states so that it only has 4 states.
• Question 9:
Use the Pumping Lemma with length to prove that the language $a^{n}a^{n+1}b^{n}b^{n-2}bb$ is not regular.
• Question 10:
I've noticed in these questions, they ask you to explain an algorithm or method of proof and then apply it. In this question, it was to decide whether an accepted language was finite or infinite. They are getting clever now, students are just memorising without understanding, thats why they are asking to explain your answer.

The questions closely resembled the supplied example paper from the 2011 and 2009 exam tutorial letters. No Mealy's or Moore's!

The Exam in May 2010

This exam was relatively straightforward. The questions closely resembled the supplied example paper.

• Question 1:
Use the Pumping Lemma with length to prove that the language $a^{2n}b^{n}$ is not regular.
• Question 2:
Given the alphabet $\left\{a, b\right\}$
a) Give the universal set,
b) the generator(s),
c) a function on the universal set,
d) write the definition of the language EVENnotAB where the words are of even length and which do not contain the substring ab.
• Question 3:
a) Give the recursive definition of $P$ of all positive integers greater than 3,
b) formulate the induction principle,
c) apply the induction principle to prove a given equation.
• Question 4:
You had to devise two regular expressions according to certain criteria.
• Question 5:
Build an FA that meets certain criteria.
• Question 6:
Use Kleene's theorem to convert a Transition Graph into a regular expression.
• Question 7:
Build an FA which is the concatenation of $FA_1$ and $FA_2$ ($r_1r_2$)
• Question 8:
Simplify a given FA with a largish number of states so that it only has 4 states.
• Question 9:
Some questions (mostly theory) about decidability.
• Question 10:
Given a word and some languages over the alphabet $\left\{a, b\right\}$, say whether or not you think it is possible for the word to be in one of the languages.

The exam in Oct/Nov 2009

The 2009 exam was definitely easier than the 2008 exam. The following 10 questions were asked:

• Question 1:
a) Give the set $S*$ over the alphabet $\left\{a, b\right\}$ that do not end on $ba$.
b) Give the set $S$ and $T$ where $S* \cup T* \not= (S \cup T)$
• Question 2:
Very similar to the assignment question and it was exactly the same as the one in the sample paper that was given.
Given the alphabet $\left\{a, b\right\}$
a) Give the universal set,
b) the generator(s),
c) a function on the universal set,
d) write the definition of the language ODDAB where the words are of odd length which do not contain the substring ab.
• Question 3:
Very similar to the assignment question and it was exactly the same as the one in the sample paper that was given.
a) Give the recursive definition of $P$ of all positive integers greater than or equal to 5,
b) formulate the induction principle,
c) apply the induction principle to prove that $2n-3 \leq 2^{n-2}$
• Question 4:
a) Give a regular expression which defines the language which generate all words with the total amount of $a's$ divisible by 3.
b) Give a regular expression which defines the language which generate all words ending on $ba$.
• Question 5:
Build an FA that does not accept the substring $ab$ anywhere in it.
• Question 6:
Use Kleene's theorem to find a regular expression. Had to convert a TG to a regular expression.
• Question 7:
$FA_1$ and $FA_2$ had to be used to find the union of these two FA's.
• Question 8:
The input and output on a Moore machine was given and the Moore machine was to be drawn using only three states.
• Question 9:
Had to use the Pumping Lemma with length to prove that $a^na^{20}b^{20}b^{n+2}$ is non regular.
• Question 10:
Explain briefly the method of finding if a language is accepted by two FA's, $FA_1$ and $FA_2$.

The exam in Oct/Nov 2008

The exam was very similar to those of previous years. The inductive proof required you to show that $x-y$ is a divisor of $x^n-y^n$ for all positive integers $n$.

The exam in Oct/Nov 2007

The exam this year covered most of the syllabus, and the format has not changed over the years. There were enough simpler questions to push 40% and above.

The exam in Oct/Nov 2003

The exam was very nice - and predictable. (The questions were nowhere near as difficult as some of the textbook ones). It seems they keep the format the same every year, and this exam was incredibly similar to the one from 2 years back. At least 25% of the questions came straight from that past paper.

How to pass COS2601

Study tips

• There are 20 exercises at the end of each chapter of the prescribed textbook by Cohen - unfortunately all without solutions. But it doesn't hurt to try them all out anyway. We could buy a (very handy) disk from Unisa with interactive exercises on the pumping lemma. It's well worth buying, even if you don't have any problems. The exercises were well chosen and written to catch you out!

• Jflap software - This is a link to excellent software for helping you studying the module and expecially useful for drawing the diagrams. Just double click on the jar file to run the program. With it you can do machines, grammars, lemmas and more (and it's free).
• An outline of outcomes of the subject - Things you should know for the exam.

Study notes

Bronwen Solutions to chapter 4 2003 A student's (correct) worked-out solutions to the first 11 problems in chapter 4 of the textbook by Cohen.
Bronwen Solutions to chapter 2 2003 A student's (correct) worked-out solutions to all 20 problems in chapter 2 of the textbook by Cohen.