Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Find

(a)\({\bf{N((}}\;{\bf{))}}\).

(b)\({\bf{N(}}\;{\bf{)))(}}\;{\bf{))((}}\;{\bf{)}}\).

(c)\({\bf{N(((}}\;{\bf{)((}}\;{\bf{))}}\).

(d)\({\bf{N(}}\;{\bf{)(((}}\;{\bf{)))((}}\;{\bf{)))}}\).

Short Answer

Expert verified

(a) The value of\(N((\;))\)is 0.

(b) The value of\(N(\;)))(\;))((\;)\)is\( - 2\).

(c) The value of\(N(((\;)((\;))\)is\(2\).

(d) The value of \(N(\;)(((\;)))((\;)))\)is\( - 1\).

Step by step solution

01

Define Sets

The collection of the number of elements is define as set. The set is denoted by a variable that has number of elements inside the brackets. Also, the change in order or the repletion of the elements makes no change in the complete set.

Consider the following function on the set of strings of parentheses defined by:

\(N\left( \lambda \right) = 0,\;N((\;) = 1,\;N()) = - 1\)

02

(a) Find \({\bf{N((}}\;{\bf{))}}\)

The objective is to find the value of\(N((\;))\).

There is one left parentheses and one right parentheses more to\(N(\;)\).

Rewrite the function\(N((\;))\)as follows:

\(\begin{aligned}{l}N((\;)) &= N(() + N())\\\;\;\;\;\;\;\;\; &= 1 + ( - 1)\\\;\;\;\;\;\;\;\; &= 0\end{aligned}\)

Therefore, the value of \(N((\;))\) is 0.

03

(b) Find \({\bf{N(}}\;{\bf{)))(}}\;{\bf{))((}}\;{\bf{)}}\)

The objective is to find the value of\(N(\;)))(\;))((\;)\).

There are three left parentheses and five right parentheses more to\(N(\;)\).

Rewrite the function\(N(\;)))(\;))((\;)\)as follows:

\(\begin{aligned}{l}N(\;)))(\;))((\;) &= N())) + N()) + N(()\\\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; &= ( - 2) + ( - 1) + 1\\\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; &= - 2\end{aligned}\)

Therefore, the value of \(N(\;)))(\;))((\;)\) is\( - 2\).

04

(c) Find \({\bf{N(((}}\;{\bf{)((}}\;{\bf{))}}\)

The objective is to find the value of\(N(((\;)((\;))\).

There are four left parentheses and two right parentheses more to\(N(\;)\).

Rewrite the function\(N(((\;)((\;))\)as follows:

\(\begin{aligned}{l}N(((\;)(()) &= N(((\;) + N(())\\\;\;\;\;\;\;\;\;\;\;\;\;\; = N(((\;) + N()) + N(()\\\;\;\;\;\;\;\;\;\;\;\;\;\; &= 2 + ( - 1) + 1\\\;\;\;\;\;\;\;\;\;\;\;\;\; &= 2\end{aligned}\)

Therefore, the value of \(N(((\;)((\;))\) is\(2\).

05

(d) Find \({\bf{N(}}\;{\bf{)(((}}\;{\bf{)))((}}\;{\bf{)))}}\)

The objective is to find the value of\(N(\;)(((\;)))((\;)))\).

There are five left parentheses and six right parentheses more to\(N(\;)\).

Rewrite the function\(N(\;)(((\;)))((\;)))\)as follows:

\(\begin{aligned}{l}N(\;)(((\;)))((\;))) &= N(\;) + N((())) + N(()))\\\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; = N(\;) + N())) + N((() + N(() + N()))\\\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; = 0 + ( - 2) + 2 + 1 + ( - 2)\\\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; &= - 1\end{aligned}\)

Therefore, the value of \(N(\;)(((\;)))((\;)))\)is\( - 1\).

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

The well-ordering property can be used to show that there is a unique greatest common divisor of two positive integers. Let a and be positive integers, and let S be the set of positive integers of the form as+bt, where s and t are integers.

a) Show that s is nonempty.

b) Use the well-ordering property to show that s has a smallest element .

c) Show that if d is a common divisor of a and b, then d is a divisor of c.

d) Show that c I a and c I b. [Hint: First, assume that cXa. Then a=qc+r, where 0<r<c. Show that rS, contradicting the choice of c.]

e) Conclude from (c) and (d) that the greatest common divisor of a and b exists. Finish the proof by showing that this greatest common divisor is unique.

For which nonnegative integer’s n is n2n!?Prove your answer.

Use strong induction to show that every positive integer n can be written as a sum of distinct powers of two, that is, as a sum of subset of the integers20=1,21=2,22=4, and so on. [Hint: For the inductive step, separately consider the case wherek+1 is even and where it is odd. When it is even, note that(k+1)/2 is an integer.]

Give a recursive algorithm for finding the sum of the first n odd positive integers.

Suppose you begin with a pile of n stones and split this pile into n piles of one stone each by successively splitting a pile of stones into two smaller piles. Each time you split a pile of stones into two smaller piles. Each time you split a pile you multiply the number of stones in each of the two smaller piles you form, so that if piles haver and s stones in them, respectively, you compute rs. Show that no matter how you split the piles, the sum of the products computed at each step equals n(n-1)/2.

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free