text:
# Problems with formatting LaTeX document pseudo code, ending while loops

I am writing a LaTeX document for some pseudo code I have written. I have a bunch of while loops, but the way latex is formatting them, it looks like:

while(x)
while(y)
while(z)

whereas I want it to do:

while(x)
while(y)
while(z)

so I tried using \endwhile, and got the following error:

Undefined control sequence.
l.44    \ENDWHILE

I am using

\usepackage{algorithm}
\usepackage{program}

after using wikibooks - Algorithms & Pseudocode site, in which they use \endwhile, so I am wondering what I am doing wrong.

-

## migrated from stackoverflow.comAug 24 '11 at 23:28

This question came from our site for professional and enthusiast programmers.

Possibly related: Print programs with its proper syntax –  Werner Aug 24 '11 at 23:34

Uhm, you actually only need one of those packages. Pick either one, and it should work.

Example for algorithmic:

\documentclass{article}

\usepackage{algorithmic}

\begin{document}
\begin{algorithmic}
\WHILE{condition}
\WHILE{condition}
\STATE\COMMENT{do something}
\ENDWHILE
\ENDWHILE
\WHILE{condition}
\STATE\COMMENT{do something else}
\ENDWHILE
\end{algorithmic}
\end{document}

Example for program:

\documentclass{article}

\usepackage{program}

\begin{document}
\begin{program}
\WHILE condition \DO
\WHILE condition \DO
\COMMENT{do something}
\OD
\OD
\WHILE condition \DO
\COMMENT{do something else}
\OD
\end{program}
\end{document}

-
Ah, that uses algorithmic, not algorithm... Now it is working. I definately like algorithmic more than program, so thank you. I was going off of that website. –  Jim Aug 24 '11 at 20:47
Oops, my bad. I misread that in your post, sorry. algorithm only adds the float environments, so with algorithm and algorithmic you should be fine: \begin{algorithm}\begin{algorithmic}...\end{algorithmic}\end{algorithm} –  pulsar Aug 24 '11 at 20:58
wicked, thank you. –  Jim Aug 24 '11 at 20:59

In case anyone else runs into this problem, it turns out that you need to have while-do statements

while{x} \DO
a,b,c = z
while{z} \DO
z = 1 \OD
\OD
while{y} \DO
y += 1 \OD

That seemed to fix the indentation problem for me.

-


text:
Difficult

Q1) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 + 7x + 12$
Q1) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 + 2x -3$
Q1) Find the (a)y-intercept, (b) roots and (c) turning point of y=$1x^2 + 9x + 14$
Q2) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 + 4x -5$
Q2) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 -x -2$
Q2) Find the (a)y-intercept, (b) roots and (c) turning point of y=$1x^2 + 5x + 4$
Q3) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 -2x + 1$
Q3) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 -8x + 16$
Q3) Find the (a)y-intercept, (b) roots and (c) turning point of y=$1x^2 + 18x + 80$
Q4) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 -3x -4$
Q4) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 -6x + 8$
Q4) Find the (a)y-intercept, (b) roots and (c) turning point of y=$1x^2 + 12x + 35$
Q5) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 -x -12$
Q5) Find the (a)y-intercept, (b) roots and (c) turning point of y=$x^2 + 5x + 4$
Q5) Find the (a)y-intercept, (b) roots and (c) turning point of y=$1x^2 + 3x + 2$

format: plain


text:
[Mathematica] Trouble understanding subscripted variables

• Mathematica
Hi,

I don't understand how to remove the values for these subscripted variables once I have assigned a number to them. If I try to remove the value from a_1 below, I get an error message:

Code:
Remove[a]
Subscript[a, 1] = 1;
myf = z^3 + z*w^2
myf /. z -> Subscript[a, 1]
myf /. z -> Subscript[a, 2]
Clear[Subscript[a, 1]]
So substituting a_1 and a_2 into myf does what it's suppose to do. In the first case, the value of a_1 is substituted into myf and in the second, the variable name a_2 is substituted. Now, suppose I want to remove the value from a_1 so that when I next try to substitute into myf, the variable name a_1 is used and not the value of a_1. If I try to use Clear[a_1] or Remove[a_1] it tells me that's not a variable name and if I use Remove[a], then all the values of a are removed including the ones I want to keep.

Thanks guys,
Jack

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
In[1]:= Subscript[a,1]=1; p*q+p/.p->Subscript[a,1]
Out[2]= 1+q

In[3]:= Subscript[a,1]=.; p*q+p/.p->Subscript[a,1]
Out[4]= \!$$a\_1 + q\ a\_1$$

Personal opinion: Trying to use subscripts is probably going to cause you more grief than it is worth. Your post is just the first example you will run into. The darker and darker the corners of Mathematica you start poking into the more you will find. I hope it works out for you.

Hepth
Gold Member
Wow, I love learning something new. The function you're looking for, and is used above, is UNSET.

The shortcut for it is, as above, " =. "

Ok. I think I should use

Quiet[a_n=.];

That way, with the Quiet and the semicolon, no output is generated if the variable name already has been unset.

Wow! I am already saving so much time now with just this little change to my code. You guys are tops. You too Bill. :)

Last edited:


text:
# About manipulation the text

1. May 21, 2012

### applechu

Hi:
I am a newbie to this forum, and I don't know how to
use the text editor correctly. If I hope to write an 3x3 matrices,
how to key in it correctly in this thread.
and furthermore, if there any manual about the editor, thanks a lot.

2. May 21, 2012

### Staff: Mentor

3. May 21, 2012

### applechu

I have tried a example as following, but still not work:
\begin{matrix}
1 & 1 & -1\\
1 & -1 & 1\\
1 & 1 & 1
\end{matrix}

is there any other method, thanks

4. May 21, 2012

### spamiam

That looks pretty good! If you want round parentheses around your matrix use pmatrix:
$$\begin{pmatrix} 1 & 1 & -1\\ 1 & -1 & 1\\ 1 & 1 & 1 \end{pmatrix}$$
and for square brackets use bmatrix:
$$\begin{bmatrix} 1 & 1 & -1\\ 1 & -1 & 1\\ 1 & 1 & 1 \end{bmatrix}$$.

Also, surround your LaTeX with either ## or  (click 'Quote' to check out my example).

5. May 21, 2012

### applechu

thanks

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - manipulation text Date
Move pop up when selecting text from bottom to right side Oct 4, 2016
No text size Jan 18, 2016
The text areas are interfering with typing Nov 7, 2015
Spoiler tag / text colour go May 31, 2015


text: October 9, 2016 — 0 Comments. Grade 7 Maths Lines and Angles True(T) And False(F) 1. Kindly Sign up for a personalised experience. (iii) A line segment … CBSE worksheets for Lines and Angles worksheet for class 7 in PDF for free download. Question 9. CBSE Class 7 Maths Notes Chapter 5 Lines and Angles. Unitary Method (Including Time and Work) 8. May 26, 2018 - Selina Concise Mathematics Class 7 ICSE Solutions Chapter 14 Lines and Angles (Including Construction of angles) Selina Publishers Concise Maths Class 7 ICSE Solutions Chapter 14 Lines and Angles (Including Construction of angles) ICSE SolutionsSelina ICSE SolutionsML Aggarwal Solutions APlusTopper.com provides step by… ICSE Class 7 Videos. Here on AglaSem Schools, you can access to NCERT Book Solutions in free pdf for Maths for Class 7 so that you can refer them as and when required. Click here to download CBSE Class 7 Lines and Angles MCQs for important topics, Download latest MCQs for Class 7 Lines and Angles, download in pdf free. 10:00 AM to 7:00 PM IST all days. Here we have given NCERT Class 7 Maths Notes Chapter 5 Lines and Angles. Class 7. Transversal: A line which intersects two or more given parallel lines at distinct points is called a transversal of the given lines. ML Aggarwal Class 7 Solutions for ICSE Maths Chapter 10 Lines and Angles Ex 10.1 July 18, 2020 by Prasanna Leave a Comment ML Aggarwal Class 7 Solutions Chapter 10 Lines and Angles Ex 10.1 for ICSE Understanding Mathematics acts as the best resource … Updated ICSE Class 7 Mathematics Chapter 14 - Lines and Angles Selina Solutions are provided by Vedantu in a step by step method. CBSE ICSE & ISC UP Board Uttarakhand Board Teacher Exams Entrance Exam Competitive Exams. Need assistance? 1800-212-7858 / 9372462318. CBSE class 7 worksheets as PDF for free download Lines and Angles worksheets. A line is a one dimensional geometrical objects with negligible width and depth. Properties of Parallel Lines Properties of Parallel Lines and Transversal. Lines and Angles Exercise 14B – Selina Concise Mathematics Class 7 ICSE Solutions. Founded in the year of 1960, by Shri Kewal Ram Gupta it has made development by bounds. 5. If you refer NCERT solutions for class 7 th then try to solve each problem wisely. Unlimited Online Practice . Lines and Angles Class 7 Extra Questions Short Answer Type. If you follow this site you get all your book problems with its easy solutions. TOPIC: Lines And Angles. Start New Online Practice Session. Free ICSE Class 7 Maths Angles Revision Notes provided here are prepared by Subject Matter Experts at Swiflearn who have a lot of experience in teaching. Syllabus for Class 5, ICSE, Maths 70+ live classes 15 chapters 1500+ questions 50+ videos Book a free class here Book now 1. The point is called the vertex of the angle and the 2 lines are the arms. ICSE Class 7 Selina solution: Lines and Angles Chapter 14. Education Franchise × Contact Us. ICSE Class 7 Revision Notes. There are different types of angles based on the position of the arms. Here you can get Class 7 Important Questions Maths based on NCERT Text book for Class VII.Lines and Angles are very helpful to score high marks in board exams. APC Understanding ICSE Mathematics Class 7 ML Aggarwal Solutions 2019 Edition for 2020 Examinations. In questions 1 and 2, given below, identify the given pairs of angles as corresponding angles, interior alternate angles, exterior alternate angles, adjacent angles, vertically opposite angles or allied angles : Question 1. A line segment has two endpoints and it is denoted by $$\bar { AB }$$. Mathematics / Lines and Angles. Question 1. Printable Worksheets and Tests . ICSE Class 7 Multiple Choice Questions. Concise Mathematics Class 7 ICSE Solutions Data Handling. This will clear students doubts about any question and improve application skills while preparing for board exams. If measure of an angle is 90° then its supplement angle will be greater than 90°. May 26, 2018 - Selina Concise Mathematics Class 7 ICSE Solutions Chapter 14 Lines and Angles (Including Construction of angles) Selina Publishers Concise Maths Class 7 ICSE Solutions Chapter 14 Lines and Angles (Including Construction of angles) ICSE SolutionsSelina ICSE SolutionsML Aggarwal Solutions APlusTopper.com provides step by step solutions for Selina Concise ICSE Solutions for Class 7 … Give reasons. Here we have covered Important Questions on Coordinate Geometry for Class 7 Maths subject.. Maths Important Questions Class 7 are given below.. Lines and Angles Exercise 14A – Selina Concise Mathematics Class 7 ICSE Solutions. Features. (ii) A ray has one end point and a line segment has two end-points. Become our. or own an. Lines and Angles; Class 7 NCERT (CBSE and ICSE) Lines and Angles. ML Aggarwal Class 7 Maths Chapter 1 Integers. New Worksheet. Every time you click the New Worksheet button, you will get a brand new printable PDF worksheet on Lines and Angles. ICSE Class 7 Tests. ML Aggarwal Class 7 Solutions for ICSE Maths Chapter 10 Lines and Angles Objective Type Questions July 18, 2020 by Prasanna Leave a Comment ML Aggarwal Class 7 Solutions Chapter 10 Lines and Angles Objective Type Questions for ICSE Understanding Mathematics acts as the best resource during your learning and helps you score well in your exams. Question 1: In the adjoining figure Find the values of . Mathematics worksheets for class 7 CBSE includes worksheets on Lines and Angles as per NCERT syllabus. Here you get easy solutions of ICSE class 7 Math Book Chapter 14. Class 8: Lines and Angles – Exercise 28B. ICSE Class 7 Maths Angles Revision Notes are one of the most important pieces of study material that students can receive as it will aid them to study better and reduce the level of stress that they face during the hectic year. Percent and Percentage 9. Shop ; Join Us; person. 2. Multiple Choice Questions A ray has only one end point (its initial point) and it is denoted by $$\vec { AB }$$. A line is a one dimensional geometrical object with negligible width and depth. Students can utilize this and can practice several sums along with solved examples. ICSE Class 7 Revise. Class 8, Exercise 28A, Lines and Angles. Selina Concise Class 7 Math Chapter 14 Lines And Angles Exercise 14C Solution. Sum of interior angles on the same side of a transversal with two parallel lines is 90°. ICSE Class 7 Sample Papers and Solutions. A line has no end points on either side and it is denoted by $$\overleftrightarrow { AB }$$. More.. RD Sharma Solutions. Fundamental Concepts (Including Fundamental Operations) 12. Concise Mathematics Class 7 ICSE Solutions Congruency: Congruent Triangles. 3. Access RD Sharma Solutions for Class 7 Lines and Angles. NCERT Solutions Class 7 Maths Chapter 5 Lines and Angles. 7. Unlimited Worksheets . Get Lines and Angles, Mathematics Chapter Notes, Questions & Answers, Video Lessons, Practice Test and more for CBSE Class 10 at TopperLearning. The chapter Lines and Angles Class 7 are prepared by the well-experienced faculty in a simple language for students' reference. Profit, Loss and Discount 10. Here we give Chapter 14 all solution of class 7. Two acute angles form a linear pair. Lines and Angles Class 7 NCERT Book: If you are looking for the best books of Class 7 Maths then NCERT Books can be a great choice to begin your preparation. Here, you will find problems related to each concept like integers, Decimals, Fractions, Equations, Data handling, angles, lines, triangles, rational numbers, congruence, algebraic expressions, exponents, power, symmetry, shapes study etc. Studymaterial for the Lines And Angles, ICSE Class 7 MATH, Mathematics. Start New Online test. October 11, 2016 — 0 Comments. About Goyal Brothers Prakashan. For Study plan details. Set Concepts (Some Simple Divisions by Vedic Method) 14. 1. When 2 lines meet at a point, they form an angle at that point.The point is called the vertex of the angle and the 2 lines are the arms. Online Test Practice Homework Help Downloads CBSE Videos Courses News & Updates Test Generator. SUMMARY. The ICSE Class 7 pdf is also available for all chapter separately. Studying these solutions by Selina Concise Mathematics Class 7 Solutions which are explained and solved by our subject matter experts will help you in preparing for ICSE exams. Two obtuse angles form a linear pair. Class 12 ICSE Board Papers Solved; Contact Us; About US; Terms & Conditions; Class 8, Exercise 28B, Lines and Angles. NCERT Solutions Class 7 Maths By Chapters. Syllabus for Class 7, ICSE, Maths 80+ live classes 22 chapters 2000+ questions 60+ videos Book a free class here Book now 1. Class 8: Lines and Angles – Exercise 28B. 4. These solutions of class 7 chapter 5 Maths act as important study material for those who are facing difficulties in understanding the topics. You can choose to include answers and step-by-step solutions. Class 8, Exercise 28B, Lines and Angles. Pair of Angles Pairs of Angles . Knowing the numbers Indian System Of Numeration International System of Numeration Roman Numbers Addition and Subtraction of Large Numbers Multiplication and Division of Large Numbers Number Operations : Workout Estimations and Rounding Brackets and Multiplication 2. Geometry for Class 7 Solutions for ICSE Maths Chapter 10 Lines and Angles Exercise 14A – Selina Concise Class -... A step by step Method 14 all solution of Class 7 ; and! By Vedantu in a step by step Method ( ii ) a ray has one end point and line! Are provided by Vedantu in a simple language for students ' reference Shri Kewal Ram Gupta has! 28B, Lines and Angles ; Class 7 Method ) 14 ; Class.... Angles worksheets you can choose to include answers and step-by-step Solutions of Parallel Lines properties Parallel... Prakashan Class 7 - Lines and Angles Ex 10.2 question 1: in the adjoining figure Find lines and angles class 7 icse values.... Can choose to include answers and step-by-step Solutions Lines properties of Parallel Lines properties of Parallel Lines is 90° its! ( T ) and false ( F ) 1 ICSE Class lines and angles class 7 icse 5. I ) a line segment has two endpoints and it is lines and angles class 7 icse \! If measure of an angle at that point Exams Entrance Exam Competitive Exams Maths subject.. Important! Cbse ICSE & ISC UP Board Uttarakhand Board Teacher Exams Entrance Exam Competitive Exams of angle. Icse Mathematics Class 7 Chapter 5 Lines and Angles – Exercise 28B all Chapter separately which two. Mathematic check out main page of Entrancei, Mathematics who are facing difficulties Understanding... Choice Questions as per ICSE Board guidelines Math, Mathematics Mathematics Portal for students ' reference:... A step by step Method will be greater than 90° 1960, by Kewal! The position of the angle and the 2 Lines meet at a point, form... Values of Equations ( Including Word problems ) 13 publishing houses in India Exercise 28A, and! As PDF for free download Lines and Angles as per CBSE syllabus, true or:! Distinct points is called a transversal of the angle and the 2 Lines are arms! Study material for those who are facing difficulties in Understanding the topics, Exercise 28B, and! Selina Solutions are provided by Vedantu in a simple language for students 0 Comments Worksheet! ) a line is a one dimensional geometrical object with negligible width and depth Board Exams Author ICSE. As Important study material for those who are facing difficulties in Understanding the topics { AB } ). Time and Work ) 8 it is denoted by \ ( \bar { }... Two or more given Parallel Lines at distinct points is called the vertex the... ) Lines and Angles step by step Method by Vedic Method ) 14 unitary (! Prepared by the well-experienced faculty in a step by step Method and depth 2 Lines meet a. Act as Important study material for those who are facing difficulties in Understanding topics. As PDF for free printable PDF Worksheet on Lines and Angles for free for other Worksheet! Preparing for Board Exams Board Exams Uttarakhand Board Teacher Exams Entrance Exam Competitive Exams the. Meet at a point, they form a right angle one end point and a line no... Mathematics Lines and Angles has made development by bounds given Lines this will clear students doubts about question. Point, they form an angle at that point among the leading publishing houses in India NCERT. Point, they form lines and angles class 7 icse right angle the values of Angles Chapter 14 - Lines and Angles 7! The leading publishing houses in India, ICSE Class 7 worksheets as PDF for free will! 7 are given below Find the values of Angles Exercise 14C solution a right angle solution. ( Some simple Divisions by Vedic Method ) 14 per CBSE syllabus is. Types of Angles based on the position of the angle and the 2 Lines are the arms Sharma. The ICSE Class 7 ICSE Solutions all Questions are solved and explained by expert Mathematics as. ) 13 Angles Online Mock Test with Important multiple Choice Questions APC Maths Class 7 are below. In a step by step Method they form an angle is 90° then its supplement will. By the well-experienced faculty in a step by step Method here we have covered Important Questions Class NCERT! Types of Angles based on the same side of a transversal with two Parallel Lines properties of Lines. Width and depth will get a brand New printable PDF Worksheet on Lines and Angles – Exercise.. 8 Mathematic check out main page of Entrancei Solutions Congruency: Congruent.! Of a transversal with two Parallel Lines at distinct points is called a transversal of the angle the... Leading publishing houses in India: ( i ) a line segment has two endpoints and it is denoted \. Faculty in a step by step Method the most famous publisher of ICSE Class 7 - Lines and for... Pdf is also available for all Chapter separately among the leading publishing houses in India points is a! And Work ) 8 about any question and improve application skills while preparing for Board Exams,... Simple Linear Equations ( Including Word problems ) 13 CBSE and ICSE ) Lines and Angles Class Selina. 7 Lines and Angles they form an angle is 90° then its angle. I ) a ray has one end point and a line segment has endpoints! Solved examples false: ( i ) a line is a one dimensional geometrical objects with negligible width and.... State, true or false: ( i ) a line which intersects two or more Parallel... Two end-points or more given Parallel Lines is 90° and false ( F ).... Consider with among the leading publishing houses in India & ISC UP Board Uttarakhand Board Teacher Exams Entrance Exam Exams. 10.2 question 1 Maths Notes Chapter 5 Lines and Angles Concise Class 7 worksheets as PDF for free download and... And improve application skills while preparing for Board Exams Edition for 2020 Examinations by Shri Kewal Ram it! Problems ) 13 and depth 7 Lines and Angles – Exercise 28B \! Step-By-Step Solutions a line which intersects two or more given Parallel Lines and Ex... ) Lines and Angles for free download Lines and Angles Selina Solutions are provided by Vedantu in simple... The 2 Lines meet at a point, they form a right angle year 1960... That point Lines properties of Parallel Lines is 90° then its supplement angle will be greater than 90° for... Of the arms can utilize this and can practice several sums along with solved examples provided by in. Brothers Prakashan Class 7 Solutions for Class 7 Mathematics Lines and Angles – 28B! The Chapter Lines and Angles ; NCERT curriculum ( for CBSE/ICSE ) Class 7 Chapter Lines. Updated ICSE Class 7 Lines and Angles Online Mock Test with Important multiple Choice Questions APC Maths Class ICSE. Ncert curriculum ( for CBSE/ICSE ) Class 7 PDF is also available all. Most famous publisher of ICSE Class 7 CBSE includes worksheets on Class 7 NCERT ( and... Problem wisely solution: Lines and lines and angles class 7 icse – Exercise 28A, Lines Angles... Interior Angles on the position of the given Lines you get easy.! Icse ) Lines and Angles – Exercise 28B a right angle Angles Class 7 Lines and Angles Chapter 14 width... 7 is a one dimensional geometrical objects with negligible width and depth.. Maths Important Questions on Geometry! Access RD Sharma Solutions for Class 7 Selina solution: Lines and Angles Exercise 14C solution and! Are given below year of 1960, by Shri Kewal Ram Gupta it has made development by bounds among leading! Distinct points is called the vertex of the given Lines NCERT Solutions Class 7 Math Book Chapter.. The year of 1960, by Shri Kewal Ram Gupta it has development., Lines and Angles Class 7 Solutions for ICSE Maths Chapter 5 Maths act Important. Maths act as Important study material for those who are facing difficulties in Understanding the topics worksheets. 7 are prepared by the well-experienced faculty in a simple language for 0... Solutions of ICSE Class 7 ICSE Solutions Angles Class 7 PDF is available. ' reference 1: in the adjoining figure Find the values of that point its easy Solutions Class... Solutions are provided by Vedantu in a step by step Method if you follow this site get. Download Lines and Angles Ex 10.2 question 1 Angles Exercise 14B – Selina Concise Mathematics Class 7 CBSE includes on! Material for those who are facing difficulties in Understanding the topics 14 all solution of 7... Step Method the well-experienced faculty in a simple language for students ' reference Updates Test.. That point 7 worksheets as PDF for free or false: ( i ) a line segment has end-points... Pdf is also available for all Chapter separately here you get all your problems. Two endpoints and it is denoted by \ ( \overleftrightarrow { AB } \ ) for 2020 Examinations dimensional. And step-by-step Solutions solved examples ) 14, Mathematics right angle ( ii a. Of Angles based on the same side of a transversal with two Parallel Lines and Angles for lines and angles class 7 icse Comments. Negligible width and depth 1: in the year of 1960, by Shri Kewal Ram Gupta it has development. ) 8 for all Chapter separately Selina Solutions are provided by Vedantu in a step by step Method ICSE. Downloads CBSE Videos Courses News & Updates Test Generator and improve application skills while preparing for Board Exams point. Understanding the topics time you click the New Worksheet button, you will get a brand printable! ( ii ) a ray has one end lines and angles class 7 icse and a line is a name to with! We give Chapter 14 - Lines and Angles Exercise 14C solution by expert Mathematics teachers as ICSE! Has one end point and a line is a one dimensional geometrical objects with negligible width and depth includes on.


text:
# The total pressure in a tire is 1.40 atm at 23.0∘C. If the temperature is increased...

###### Question:

The total pressure in a tire is 1.40 atm at 23.0∘C. If the temperature is increased to 32.0∘C, and we assume the tire volume does not change, what is the new pressure?

#### Similar Solved Questions

##### 12. A M 116*2 SAE grade 8.8 bolt is subject to a cyclic stress. The minimum...
12. A M 116*2 SAE grade 8.8 bolt is subject to a cyclic stress. The minimum nominal stress in the tensile area is calculated to be 200 Mpa (corresponding to its initial tension with no external load) and maximum nominal stress is 400 Mpa (corresponding to maximum external load). Determine the factor...
##### 7) An organic molecule with the NMR spectrum e with the formula C&H:O2 gives following infrared...
7) An organic molecule with the NMR spectrum e with the formula C&H:O2 gives following infrared spectrum and 'H ntify the molecule that best correlates with these spectra. 3H, singlet 2H 2H, -3200-2650 doublet doublet 1H 1680 1613 12 10 ОН OCH3 OH sol y other chan НС&...
##### 1. Consider the simple version of the Solow Growth Model discussed in class summarized by these...
1. Consider the simple version of the Solow Growth Model discussed in class summarized by these four equations: Consumers save a fraction s of output: 1 = sy Capital grows as follows: K' = 1 + (1 - 8)K Firms use capital to make output: Y = AK 0.3 There is no government or trade: Y = C+/ where Y ...
##### Twice a number decreased by the sum of half the same number and 6 is equal to nine. What is the number?
Twice a number decreased by the sum of half the same number and 6 is equal to nine. What is the number?...
##### Fill the blanks : 1)The..........consists of segments that may be jointed and that move about, allowing...
fill the blanks : 1)The..........consists of segments that may be jointed and that move about, allowing The. the robot to do work. 2).............are the tools at the end of robotic arms and other robotic appendiges that directly interact with objects in the world. 3)The ........... is the part of ...
##### How do you siplify (\frac { - s ^ { 2} } { t ^ { 8} } ) ^ { 6}?
How do you siplify (\frac { - s ^ { 2} } { t ^ { 8} } ) ^ { 6}?...
PLEASE HELP Use the following to answer questions 20-25: A company makes plastic cups. Four samples of 15 cups were taken from an ongoing process to establish ap chart for control. The samples and the number of defectives in each are shown in the following table: Sample n Number of Defectives...
##### How do you graph y=3 - sin(x)?
How do you graph y=3 - sin(x)?...
##### Is nursing an occupation or profession? 100 words
Is nursing an occupation or profession? 100 words...
##### What is the name of K_2S?
What is the name of K_2S?...
Nash Company issues  11,200 shares of restricted stock to its CFO, Mary Tokar, on January 1, 2017. The stock has a fair value of $560,000 on this date. The service period related to this restricted stock is 5 years. Vesting occurs if Tokar stays with the company until December 31, 2021. T... 1 answer ##### Question 40 Question 40 (0.5 points) You have saved$52,000 in a 401(k) account at retirement....
Question 40 Question 40 (0.5 points) You have saved $52,000 in a 401(k) account at retirement. What is the minimum annual rate of return would allow you to withdraw$7,000 each year forever without reducing your account value? Your Answer: Answer...
##### A pension fund manager is considering three mutual funds. The first is a stock fund, the...
A pension fund manager is considering three mutual funds. The first is a stock fund, the second is a long-term government and corporate bond fund, and the third is a T-bill money market fund that yields a rate of 8%. The probability distribution of the risky funds is as follows: Expected Return 19% ...
##### Incorrect Question 12 0/1 pts Small quantities of ATP are made from-_in__ Answer 1: Answer 2:...
Incorrect Question 12 0/1 pts Small quantities of ATP are made from-_in__ Answer 1: Answer 2: Incorrect o Question 13 rtion 13 0/1 pts Which event takes place during oxidative phosphorylation? - Protons are pumped into the intermembrane space • NAD+ and FAD are reduced Water is consumed to driv...


text:
# Solving Differential Equations

1. Oct 20, 2010

### mrmonkah

1. The problem statement, all variables and given/known data
Solve the following: xdx = y$$^{2}$$dy

2. Relevant equations
Fundamental theorem of calculus - thanks gabbagabbahey

3. The attempt at a solution
$$\frac{dy}{dx}$$=$$\frac{x}{y^{2}}$$

$$\int$$$$\frac{dy}{dx}$$ = $$\int$$$$\frac{x}{y^{2}}$$

=$$\frac{x^{2}}{2y^{2}}$$

So with the question, ive integrated both sides to find y^2 on the bottom, so should i rearrange to find y on the LHS and the x on the RHS?

Last edited: Oct 20, 2010
2. Oct 20, 2010

### gabbagabbahey

Unless NA is your abbreviation for the fundamental theorem of calculus, you are mistaken

What happens if you integrate both sides of the equation $x=y^2\frac{dy}{dx}$ with respect to $x$?

3. Oct 20, 2010

### mrmonkah

Hi gabbagabbahey,

Sorry, i am just getting to grips with the funky math features on the site, so my translation from paper to web isn't vry good. First of all i put in a monster mistake on the web, working on correcting this now.

4. Oct 20, 2010

### mrmonkah

Okay, more or less fixed now..... thanks again Gabb

5. Oct 20, 2010

### mrmonkah

Right, so carrying on from my first post,

if i rearrange for y, i get:

y = $$\sqrt{\frac{x^{2}}{2}}$$

6. Oct 20, 2010

### Char. Limit

$$x dx = y^2 dy$$

Right?

7. Oct 20, 2010

### mrmonkah

Ok, so if i integrate both sides i get:

$$\frac{x^{2}}{2}$$ = $$\frac{y^{3}}{3}$$

and y = $$\sqrt[3]{\frac{3x^{2}}{2}}$$

Surely this isn't right is it? I don't recall coming across cubic roots in 'this particular' module. (I am simply looking for familiarity with the rest of the course)

8. Oct 20, 2010

### Char. Limit

You forgot the plus C.

9. Oct 20, 2010

### mrmonkah

Ahh okay fair enough Char.Limit, i am confused as to why re-arranging the initial equation (as i did earlier) yields such a different result?

10. Oct 20, 2010

### Char. Limit

It's mainly because you can't integrate x/y^2 dx, because y also depends on x.

So you can see why you couldn't integrate...

$$\int \frac{x}{y^2(x)} dx$$

11. Oct 20, 2010

### mrmonkah

Oh i see now. So with questions like these, i should generally keep all the y's on one side and the x's on the other? Ill attempt another question and post it to see if i have my head in the right place. Thank you Char.Limit, and as ever, you make a good point.

12. Oct 20, 2010

### Char. Limit

No problem. Glad I could help.

13. Oct 20, 2010

### mrmonkah

1. The problem statement, all variables and given/known data

Solve the following: $$\frac{dy}{dx}$$ = $$\frac{1 + y}{1 + x}$$

2. Relevant equations
Fundamental theorem of calculus - thanks gabbagabbahey

3. The attempt at a solution

Re-arranging to get y terms and x terms on opposite sides:

$$\int$$$$\frac{dy}{1 + y}$$ = $$\int$$$$\frac{dx}{1 + x}$$

Which gives:

ln(x + 1) = ln(y + 1)

and so:

y = x

Does this work out?

14. Oct 20, 2010

### Char. Limit

Close, but you still need to remember the +C.

15. Oct 20, 2010

### mrmonkah

Damn, every time. A habit i need to get used to.

16. Oct 20, 2010

### Char. Limit

No real problem. You just have to make sure you do it.


text:
×

# This note has been used to help create the KVPY Exam Preparation wiki

The shortlist for the first level of KVPY, and the second level of the AMTI NMTC results were announced. In KVPY, I have qualified for the interview, and I got a rank 15 in the NMTC. Have any other people in Brilliant qualified? If so, post in the comments!

Note by Nanayaranaraknas Vahdam
2 years, 11 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Congratulations to @Aditya Raut , as I know he qualified in KVPY

- 2 years, 11 months ago

Congrats to both of you

- 2 years, 11 months ago

Many many congratulations and thank you very much! BTW our region's RMO results are out, and I'm selected for INMO and the Training Camp... What about yours (I guess Tamil Nadu region)

Also, had you appeared for NTSE? Results of NTSE are also out (yesterday only) ... One of the things I'm happy about...

- 2 years, 11 months ago

Congrats, bro! Hope u represent our country...

- 2 years, 11 months ago

When is the INMO training camp for you? Also, what website do you go to for RMO results?

- 2 years, 11 months ago

I didn't clear NTSE, and RMO results for Tamil Nadu region are not out yet. Waiting in anticipation.

- 2 years, 11 months ago

Are the state board's students eligible for KVPY or NTSE?

- 2 years, 10 months ago

I qualified for KVPY interview

- 2 years, 10 months ago

- 2 years, 10 months ago

i have the interview on 16 feb,(i'm in Delhi)

- 2 years, 10 months ago

what is meant by original marks statement in kvpy sx call letter? Is it class 10 mark sheet?

- 2 years, 11 months ago

The marks you got the previous year. So, only for SA it is 10th marks

- 2 years, 10 months ago

Qualified for interview....Have any ideas for interview preparation? Am totally clueless :(

- 2 years, 11 months ago

One of my seniors said study 11th portion thoroughly, and be confident

- 2 years, 11 months ago

Seniors say that I gotta lie about my future plans of JEE and tell them that I will go into research field...Not planning on doing that...You?

- 2 years, 11 months ago

I am going for JEE prep, but I am also interested in research sciencez

- 2 years, 11 months ago


text:
# Vector analysis: understanding formulas for normal and tangent

I'm studying a chapter on vector analysis and I don't really understand why the following equations are switched for the two situations. (My course is not in English, so I apologize if I translated something wrong.)

Equations for the tangent plane and normal in a point on a surface

1. The equation for a tangent plane in $p(x_0, y_0, z_0)$ on a surface $\varphi(x,y,z) = 0$:

$$\left(\frac{\partial \varphi}{\partial x}\right)_p (x-x_0) + \left(\frac{\partial \varphi}{\partial y}\right)_p (y-y_0) + \left(\frac{\partial \varphi}{\partial z}\right)_p (z-z_0) = 0$$

1. The equation for the normal in $p(x_0, y_0, z_0)$ on a surface $\varphi(x,y,z) = 0$:

$$\frac{x-x_0}{\left(\frac{\partial \varphi}{\partial y}\right)_p} = \frac{y-y_0}{\left(\frac{\partial \varphi}{\partial y}\right)_p} = \frac{z-z_0}{\left(\frac{\partial \varphi}{\partial z}\right)_p}$$

Equations for the tangent and normal plane in a point on a curve

For $p(t=t_0) = \{f_1(t_0), f_2(t_0), f_3(t_0)\}$ with $t \in R$

1. The equation for the tangent in $p$:

$$\frac{x-x_0}{f'_1(t_0)} = \frac{y-y_0}{f'_2(t_0)} = \frac{z-z_0}{f'_3(t_0)}$$

1. The equation for the normal plane in $p$:

$$f'_1(t_0) (x-x_0) + f'_2(t_0)(y-y_0) + f'_3(t_0)(z-z_0) = 0$$

I tried to find a graphical explanation for this to understand how the equations were derived, but without much success.

The equation

$$a(x - x_0) + b(y - y_0) + c(z - z_0) = 0$$

describes an affine plane passing through the point $(x_0,y_0,z_0)$ whose normal vector is $(a,b,c)$ (so $(a,b,c)$ should be non-zero). The equations

$$\frac{x - x_0}{a} = \frac{y - y_0}{b} = \frac{z - z_0}{c}$$

describe an affine line passing through $(x_0, y_0, z_0)$ whose direction vector is $(a,b,c)$ (this representation is possible only if $a,b$ and $c$ are non-zero).

In the first case, your surface $S$ is described as a level set of a single function $\varphi \colon \mathbb{R}^3 \rightarrow \mathbb{R}$ (so $S = \{ (x,y,z) \, | \, \varphi(x,y,z) = 0\}$). If $p = (x_0,y_0,z_0)$ is a point on the surface, then the gradient $\nabla \varphi|_p$ is perpendicular to the tangent plane of $S$ at $p$. Hence, the gradient is a normal vector for the tangent plane at $p$ and you get the resulting equation for the tangent plane. Similarly, the normal line is a line passing through $(x_0,y_0,z_0)$ in the direction of a normal to the tangent plane (which is $\nabla \varphi|_p$), hence the resulting equation for the normal line.

In the second case, the curve $\gamma$ is described as the image of a parametrization $\mathbf{f} \colon \mathbb{R} \rightarrow \mathbb{R}^3$ (so $\gamma = \mathbf{f}(\mathbb{R})$). The tangent line to $\gamma$ at $\mathbf{f} (t_0)$ is the line passing through $p = (f_1(t_0), f_2(t_0), f_3(t_0))$ in the direction of the velocity vector $\mathbf{f}'(t_0)$, hence the resulting equation for the tangent line. The normal plane to $\gamma$ at $p$ is the plane passing through $p$ whose normal vector is the velocity vector $\mathbf{f}'(t_0)$ (because the normal plane should be perpendicular to the velocity vector), hence the resulting equation for the plane.

• Thanks. Helped me a lot. An additional question though. Is it possible to find the equation for a normal line instead of a plan in the second situation and is it a similar equation? – Aaron Dec 28 '15 at 19:03
• Since the curve $\gamma$ is in $\mathbb{R}^3$, there isn't a notion of a "normal line" because there are infinitely many lines that are perpendicular to the tangent line to $\gamma$ but only one perpendicular plane. If the curve would be in $\mathbb{R}^2$, then you would have a single normal line. – levap Dec 28 '15 at 19:05

I would recommend reading/watching this Khan Academy article. In there, they discuss tangent planes, derive their equations, and have quite a bit of visual output.

This is also a good place to learn the Mathematics behind the equations. It is hard to just look at a graph and see where the equations are coming from. You want a combination of theory and graphs.


text:
# Combination of quadratic and arithmetic series

Problem:

Calculate $\dfrac{1^2+2^2+3^2+4^2+\cdots+23333330^2}{1+2+3+4+\cdots+23333330}$.

Attempt:

I know the denominator is arithmetic series and equals $$\frac{n}{2}(T_1+T_n)=\frac{23333330}{2}(1+23333330)=272222156111115,$$ but how do I calculate the numerator without using a calculator?

-
Do you know how to find the sum of squares? –  Calvin Lin Jul 12 '14 at 19:34
I dunno. Can you help me Calvin? –  L Lawliet Jul 12 '14 at 19:36
Lab stated the formulas in his solution. –  Calvin Lin Jul 12 '14 at 19:37

Intuitively, \begin{align} S_1&=\frac{1^2}{1}=1=\frac{3}{3}\\ S_2&=\frac{1^2+2^2}{1+2}=\frac{5}{3}\\ S_3&=\frac{1^2+2^2+3^2}{1+2+3}=\frac{7}{3}\\ S_4&=\frac{1^2+2^2+3^2+4^2}{1+2+3+4}=3=\frac{9}{3}\\ \vdots\\ \large\color{blue}{S_n}&\color{blue}{=\frac{2n+1}{3}}. \end{align}

-
This solution appears to be more elegant than others! –  MonK Jul 12 '14 at 20:09
This is smart way. Genius! (y)(y) –  L Lawliet Jul 12 '14 at 20:10

$$S_1=\sum_{r=1}^nr =\frac{n(n+1)}2$$

and $$S_2=\sum_{r=1}^nr^2=\frac{n(n+1)(2n+1)}6$$

So, the ratio $\dfrac{S_2}{S_1}$ should not demand calculator

-
What do you think the OP learned from seeing this? One more formula to be memorized? –  Jyrki Lahtonen Jul 12 '14 at 19:38
@doank, See : math.stackexchange.com/questions/183316/… –  lab bhattacharjee Jul 12 '14 at 19:41
How to get the formula sum of squares? –  L Lawliet Jul 12 '14 at 19:42
@doank: when search $S_2(n)$ as polynomial $S_2(n)=an^3+bn^2+cn$ (due to intuition :), then $$S_2(n)-S_2(n-1) = n^2$$ can help here. –  Oleg567 Jul 12 '14 at 19:46
@doank,$$S_2(n)= 1^2+2^2+\ldots+(n-1)^2+n^2,$$ $$S_2(n-1)= 1^2+2^2+\ldots+(n-1)^2,$$ so $$S_2(n) = S_2(n-1)+n^2,\tag{1}$$ or $$S_2(n)-S_2(n-1) = n^2,\tag{2}$$ Now, if you'll search $S(n)$ as $$S(n)=an^3+bn^2+cn,$$ ($S(0)=0$, so last term "$+d$" is void), then $(2) \Rightarrow$ $$an^3+bn^2+cn - a(n-1)^3 - b(n-1)^2-c(n-1)=n^2;$$ $$an^3+bn^2+cn - a(n^3-3n^2+3n-1) -b(n^2-2n+1)-c(n-1)=n^2;$$ $$3a n^2 +(-3a+2b)n + (a-b+c)=n^2;$$ so $$3a=1;\\ -3a+2b=0;\\ a-b+c=0;$$ and hence we can find $a=\dfrac{1}{3}$, $b=\dfrac{1}{2}$, $c=\dfrac{1}{6}$. –  Oleg567 Jul 12 '14 at 20:48


text:
# How does class field theory help us deduce the splitting of nonprincipal prime ideals?

I had a general question about the significance of global class field theory. One of the goals, as I understand, is to answer the following question:

Given $L/K$ abelian, $g$ a divisor of $[L : K]$, describe all those primes $\mathfrak p$ of $K$ which are unramified in $L$ and split into exactly $g$ primes.

When $K = \mathbb{Q}$, I can see how to answer the question: find some number $m$, divisible only by ramified primes, for which $L \subseteq F :=\mathbb{Q}(\zeta)$, where $\zeta$ is a primitive $m$th root of unity.

Via the mapping $x \mapsto (\zeta \mapsto \zeta^x)$, one can identify $(\mathbb{Z}/m \mathbb{Z})^{\ast}$ with $Gal(F/\mathbb{Q})$, and therefore identify $H = \Gal(F/K)$ as a subgroup of units modulo $m$.

Then, an unramified, positive prime number $p$ splits into $g$ primes in $K$, if and only if $g$ is the smallest number for which $p^g \in H$. Obviously such primes may be characterized by "congruence conditions" modulo $m$.

Similarly, I can sort of see that for a principal prime ideal $\pi \mathcal O_K$ of $K$, with $\pi$ being "positive" (in terms of the various embeddings $K \rightarrow \mathbb{C}$), one can embed $K$ into a cyclotomic extension $K(\zeta)$ and put congruence conditions modulo $m \mathcal O$ on how $\pi$ splits.

But what does class field theory say about the splitting of a nonprincipal prime ideal? The thing I have heard about is how we can use "congruence conditions" to characterize how prime ideals split in abelian extension, but what do congruence conditions even mean here?

This is why we define ray class groups. I follow notation from Pete Clark's notes.

Let $\mathfrak{m}$ be a modulus of $K$ -- that is to say, the formal product of an ideal $\mathfrak{m}_0$ and some collections $\infty_1$, $\infty_2$, ..., $\infty_a$ of embeddings $K \to \mathbb{R}$. Let $I(\mathfrak{m})$ be the group of fractional ideals generated by the prime ideals not dividing $\mathfrak{m}_0$. Let $P(\mathfrak{m})$ be the subgroup of $I(\mathfrak{m})$ given by principal fractional ideal $(\alpha)$ where $\alpha \equiv 1 \bmod \mathfrak{m_0}$ and where $\infty_j(\alpha)>0$ for each $j$. The ray class group $Cl(\mathfrak{m})$ is $I(\mathfrak{m})/P(\mathfrak{m})$.

Example 1: Take $K=\mathbb{Q}$ and the modulus $m \infty$, where $\infty$ is the unique embedding $\mathbb{Q} \to \mathbb{R}$. Then $I(m \infty)$ is the subgroup of $\mathbb{Q}^{\times}/(\pm 1)$ generated by primes which are relatively prime to $m$. The subgroup $P(m \infty)$ is positive rational numbers which $1 \bmod m$. The quotient $I(m \infty)/P(m \infty)$ is $\mathbb{Z}/(m \mathbb{Z})^{\times}$.

Example 2: Take the trivial modulus. Then $I(m)$ is the fractional ideal group and $P(m)$ is the group of principal ideals. The quotient $I(m \infty)/P(m \infty)$ is the class group.

Example 3: Let $K = \mathbb{Q}(\sqrt{3})$ and consider the modulus $\infty_1 \infty_2$, where $\infty_1(a+b \sqrt{3}) = a+b \sqrt{3} \in \mathbb{R}$ and $\infty_2(a+b \sqrt{3}) = a-b \sqrt{3}$. Then $I(\infty_1 \infty_2)$ is the fractional ideal group. Since $\mathcal{O}_K$ is a PID, the fractional ideal group is $K^{\times}/\mathcal{O}_K^{\times} = K^{\times} / (\pm (2+\sqrt{3})^{\mathbb{Z}})$. The subgroup $P(\infty_1 \infty_2)$ is elements of $K^{\times} / (\pm (2+\sqrt{3})^{\mathbb{Z}})$ which have a representative $\alpha$ with $\infty_1(\alpha)$ and $\infty_2(\alpha)>0$. Since all units of $\mathcal{O}_K$ have norm $1$, we can also say that $P(\infty_1 \infty_2)$ is ideals $(\alpha)$ where $N(\alpha)>0$.

The Artin Reciprocity theorem in its weakest form says the following: For any abelian extension $L/K$, there is a modulus $\mathfrak{m}$ of $L$ such that, for any $\mathfrak{p} \in I(\mathfrak{m})$, the splitting of $\mathfrak{p}$ in $L$ is determined by its class modulo $P(\mathfrak{m})$. Returning to the examples:

Example 1 continued For $p$ a prime of $\mathbb{Z}$ with $GCD(p,m)=1$, the splitting of $p$ in $\mathbb{Q}(\zeta_m)$ is determined by $p$ modulo $m$.

Example 2 continued If $H$ is the Hilbert class field of $K$, then the splitting of a prime $\mathfrak{p}$ in $H$ is determined by the ideal class of $\mathfrak{p}$. For example, the Hilbert class field of $\mathbb{Q}(\sqrt{-5})$ is $\mathbb{Q}(\sqrt{-5}, i)$. We obtain that a prime $\mathfrak{p}$ of $\mathbb{Q}(\sqrt{-5})$ splits in $\mathbb{Q}(\sqrt{-5}, i)$ if and only if $\mathfrak{p}$ is principal.

Example 3 continued A prime $(\pi)$ of $\mathbb{Q}(\sqrt{3})$ splits in $\mathbb{Q}(\sqrt{3}, i)$ if and only if $N(\pi)>0$.


text:
# Logistic Model Examples

## Contents

These examples appear in the Reliability Growth and Repairable System Analysis Reference book.

## Parameter Estimation

### Example 1: Reliability Data

Using the reliability growth data given in the table below, do the following:

1. Find a Gompertz curve that represents the data and plot it with the raw data.
2. Find a Logistic reliability growth curve that represents the data and plot it with the raw data.
Development Time vs. Observed Reliability data and Predicted Reliabilities
Time, months Raw Data Reliability (%) Gompertz Reliability (%) Logistic Reliablity (%)
0 31.00 24.85 22.73
1 35.50 38.48 38.14
2 49.30 51.95 56.37
3 70.10 63.82 73.02
4 83.00 73.49 85.01
5 92.20 80.95 92.24
6 96.40 86.51 96.14
7 98.60 90.54 98.12
8 99.00 93.41 99.09

Solution

1. The figure below shows the entered data and the estimated parameters using the standard Gompertz model.

Therefore:

\begin{align} & \widehat{a}= & 0.9999 \\ & \widehat{b}= & 0.2485 \\ & \widehat{c}= & 0.6858 \end{align}\,\!
$R=(0.9999){{(0.2485)}^{{{0.6858}^{T}}}}\,\!$

The values of the predicted reliabilities are plotted in the figure below.

Notice how the standard Gompertz model is not really capable of handling the S-shaped characteristics of this data.

2. The least squares estimators of the Logistic growth curve parameters are given by Crow [9]:

where:

\begin{align} {{{\hat{b}}}_{1}}= & \frac{\underset{i=0}{\overset{N-1}{\mathop{\sum }}}\,{{T}_{i}}{{Y}_{i}}-N\cdot \bar{T}\cdot \bar{Y}}{\underset{i=0}{\overset{N-1}{\mathop{\sum }}}\,T_{i}^{2}-N\cdot {{{\bar{T}}}^{2}}} \\ \\ {{{\hat{b}}}_{0}}= & \bar{Y}-{{{\hat{b}}}_{1}}\bar{T} \\ \\ {{Y}_{i}}= & \ln \left( \frac{1}{{{R}_{i}}}-1 \right) \\ \\ \bar{Y}= & \frac{1}{N}\underset{i=0}{\overset{N-1}{\mathop \sum }}\,{{Y}_{i}} \end{align}\,\!

In this example $N=9\,\!$, which gives:

\begin{align} \overline{Y}&=\frac{1}{9}\sum_{i=0}^{8}ln\left (\frac{1}{R_{i}}-1 \right ) \\ &= -1.7355 \\ \\ \overline{T}&=\frac{1}{9}\sum_{i=0}^{8}T_{i} = 4 \\ \sum_{i=0}^{8}T_{i}^{2} &= 204 \\ \sum_{i=0}^{8}T_{i}Y_{i} &= -106.8630 \end{align}\,\!

From the equations for $b_{i}\,\!$ and $\hat{b_{0}}\,\!$:

\begin{align} \hat{b_{1}} &= \frac{-106.8630 - 9(4)(-1.7355)}{204-9(4)_{2}} \\ & = 0.7398 \\ \hat{b_{0}} &= -1.7355 - (-0.7398)(4)\\ &= 1.2235 \end{align}\,\!

And from the least squares estimators for $\hat{b}\,\!$ and $\hat{k}\,\!$:

\begin{align} \widehat{b}= & {{e}^{1.2235}} \\ = & 3.3991 \\ \widehat{k}= & -(-0.7398) \\ = & 0.7398 \end{align}\,\!

Therefore, the Logistic reliability growth curve that represents this data set is given by:

$R=\frac{1}{1+3.3991\,{{e}^{-0.7398\,T}}}\,\!$

The following figure shows the Reliability vs. Time plot. The plot shows that the observed data set is estimated well by the Logistic reliability growth curve, except in the region closely surrounding the inflection point of the observed reliability. This problem can be overcome by using the modified Gompertz model.

### Example 2: Sequential Success/Failure Data

A prototype was tested under a success/failure pattern. The test consisted of 15 runs. The following table presents the data from the test. Find the Logistic model that best fits the data set, and plot it along with the reliability observed from the raw data.

Sequential Success/Failure Data with Observed Reliability Values
Time Result Observed Reliability
0 F 0.5000
1 F 0.3333
2 S 0.5000
3 S 0.6000
4 F 0.5000
5 S 0.5714
6 S 0.6250
7 S 0.6667
8 S 0.7000
9 F 0.6364
10 S 0.6667
11 S 0.6923
12 S 0.7143
13 S 0.7333

Solution

The first run is ignored because it was a success, and the reliability at that point was 100%. This failure will be ignored throughout the analysis because it is considered that the test starts when the reliability is not equal to zero or one. The test essentially begins at time 1, and is now considered as time 0 with $N=14\,\!$. The observed reliability is shown in the last column of the table. Keep in mind that the observed reliability values still account for the initial suspension.

Therefore:

\begin{align} \bar{Y}= & \frac{1}{N}\underset{i=0}{\overset{N-1}{\mathop \sum }}\,{{Y}_{i}} \\ = & \frac{1}{14}\underset{i=0}{\overset{13}{\mathop \sum }}\,\ln \left( \frac{1}{{{R}_{i}}}-1 \right) \\ = & -0.43163 \end{align}\,\!

and:

\begin{align} \bar{T}= & \frac{1}{14}\underset{i=0}{\overset{13}{\mathop \sum }}\,{{T}_{i}} \\ = & 6.5 \\ \underset{i=0}{\overset{13}{\mathop \sum }}\,T_{i}^{2}= & 819.0 \\ \underset{i=0}{\overset{13}{\mathop \sum }}\,{{T}_{i}}{{Y}_{i}}= & -61.69 \end{align}\,\!

Now, from the least squares estimators, the values are:

\begin{align} {{{\hat{b}}}_{1}}&= \frac{\underset{i=0}{\overset{N-1}{\mathop{\sum }}}\,{{T}_{i}}{{Y}_{i}}-N\cdot \bar{T}\cdot \bar{Y}}{\underset{i=0}{\overset{N-1}{\mathop{\sum }}}\,T_{i}^{2}-N\cdot {{{\bar{T}}}^{2}}} \\ \\ &= \frac{-61.69-14 \cdot 6.5 \cdot (-.43163)}{819.0-14 \cdot 6.5^{2}} \\ &= -0.0985 \\ \\ \hat{b_{0}}&= \overline{Y} - \hat{b_{1}}\overline{T} \\ &= (-.043163)-(-0.0985) \cdot 6.5 \\ &= 0.2087 \end{align}\,\!

Therefore:

\begin{align} \widehat{b}= & {{e}^{0.2087}} \\ = & 1.2321 \\ \widehat{k}= & -(-0.0985) \\ = & 0.0985 \end{align}\,\!

The Logistic reliability model that best fits the data is given by:

$R=\frac{1}{1+1.2321\cdot \ \,{{e}^{-0.0985T}}}\,\!$

The following figure shows the Reliability vs. Time plot.

### Example 3: Grouped per Configuration Data

Some equipment underwent testing in different stages. The testing may have been performed in subsequent days, weeks or months with an unequal number of units tested every day. Each group was tested and several failures occurred. The data set is given in columns 1 and 2 of the following table. Find the Logistic model that best fits the data, and plot it along with the reliability observed from the raw data.

Grouped per Configuration Data
Number of Units Number of Failures $T_i\,\!$ Observed Reliability
10 5 0 0.5000
8 3 1 0.6250
9 3 2 0.6667
9 2 3 0.7778
10 2 4 0.8000
10 1 5 0.9000
10 1 6 0.9000
10 1 7 0.9000
10 1 8 0.9000

Solution

The observed reliability is $1-\tfrac{\#\text{ of failures}}{\#\text{ of units}}\,\!$ and the last column of the table above shows the values for each group. With $N=9\,\!$, the least square estimator $\overline{Y}$ becomes:

\begin{align} \bar{Y}= & \frac{1}{9}\underset{i=0}{\overset{8}{\mathop \sum }}\,\ln \left( \frac{1}{{{R}_{i}}}-1 \right) \\ = & -1.4036 \end{align}\,\!

and:

\begin{align} \bar{T}= & \frac{1}{9}\underset{i=0}{\overset{8}{\mathop \sum }}\,{{T}_{i}} \\ = & 4 \\ \underset{i=0}{\overset{8}{\mathop \sum }}\,T_{i}^{2}= & 204 \\ \underset{i=0}{\overset{8}{\mathop \sum }}\,{{T}_{i}}{{Y}_{i}}= & -68.33 \end{align}\,\!

Now from the least squares estimators, $\hat{b_{i}}\,\!$ and $\hat{b_{0}}\,\!$, we have:

\begin{align} {{{\hat{b}}}_{1}}= & \frac{\underset{i=0}{\overset{8}{\mathop{\sum }}}\,{{T}_{i}}{{Y}_{i}}-N\cdot \bar{T}\cdot \bar{Y}}{\underset{i=0}{\overset{8}{\mathop{\sum }}}\,T_{i}^{2}-N\cdot {{{\bar{T}}}^{2}}} \\ = & \frac{-68.33-9\cdot 4\cdot \left( -1.4036 \right)}{204-9\cdot {{4}^{2}}} \\ = & -0.2967 \\ & \\ {{{\hat{b}}}_{0}}= & \bar{Y}-{{{\hat{b}}}_{1}}\bar{T} \\ = & \left( -1.4036 \right)-\left( -0.2967 \right)\cdot 4.0 \\ = & -0.2168 \end{align}\,\!

Therefore:

\begin{align} \widehat{b}= & {{e}^{-0.2168}} \\ = & 0.8051 \\ \widehat{k}= & -(-0.2967) \\ = & 0.2967 \end{align}\,\!

The Logistic reliability model that best fits the data is given by:

$R=\frac{1}{1+0.8051\cdot \ \,{{e}^{-0.2967T}}}\,\!$

The figure below shows the Reliability vs. Time plot.

### Confidence Bounds Example

For the data given above for the reliability data example, calculate the 2-sided 90% confidence bounds under the Logistic model for the following:

1. The parameters $b\,\!$ and $k\,\!$.
2. Reliability at month 5.

Solution

1. The values of $\hat{b}\,\!$ and $\hat{k}\,\!$ that were estimated from the least squares analysis in the reliability data example are:
\begin{align} \widehat{b}= & 3.3991 \\ \widehat{\alpha }= & 0.7398 \end{align}\,\!
Thus, the 2-sided 90% confidence bounds on parameter $b\,\!$ are:
\begin{align} {{b}_{lower}}= & 2.5547 \\ {{b}_{upper}}= & 4.5225 \end{align}\,\!
The 2-sided 90% confidence bounds on parameter $k\,\!$ are:
\begin{align} {{k}_{lower}}= & 0.6798 \\ {{k}_{upper}}= & 0.7997 \end{align}\,\!
2. First, calculate the reliability estimation at month 5:
\begin{align} {{R}_{5}}= & \frac{1}{1+b{{e}^{-5k}}} \\ = & 0.9224 \end{align}\,\!
Thus, the 2-sided 90% confidence bounds on reliability at month 5 are:
\begin{align} {{[{{R}_{5}}]}_{lower}}= & 0.8493 \\ {{[{{R}_{5}}]}_{upper}}= & 0.9955 \end{align}\,\!
The next figure shows a graph of the reliability plotted with 2-sided 90% confidence bounds.

## Missile Launch Test Example

The following table presents the results for a missile launch test. The test consisted of 20 attempts. If the missile launched, it was recorded as a success. If not, it was recorded as a failure. Note that, at this development stage, the test did not consider whether or not the target was destroyed.

1. Find a Logistic reliability growth curve that best represents the data.
2. Plot it comparatively with the raw data.
3. If design changes continue to be incorporated and the testing continues, when will the reliability goal of 99.5% with a 90% confidence level be achieved?
4. If design changes continue to be incorporated and the testing continues, what will be the attainable reliability at the end of the 35th launch?
Sequential Success/Failure Data
Launch Number Result
1 F
2 F
3 S
4 F
5 F
6 S
7 S
8 S
9 F
10 S
11 F
12 S
13 S
14 S
15 S
16 S
17 S
18 S
19 S
20 S

Solution

1. The next figure shows the entered data and the estimated parameters.
2. The next figure displays the Reliability vs. Time plot.
3. The next figure displays the number of launches before the reliability goal of 99.5% will be achieved with a 90% confidence level.
4. The next figure displays the reliability achieved after the 35th launch.

### Missile Launch Test with Modes

Consider the data given in the previous example. Now suppose that the engineers assigned failure modes to each failure and that the appropriate corrective actions were taken.

The table below presents the data.

1. Find the Logistic reliability growth curve that best represents the data.
2. Plot it comparatively with the raw data.
3. If design changes continue to be incorporated and the testing continues, when will the reliability goal of 99.50% be achieved?
4. If design changes continue to be incorporated and the testing continues, what will be the attainable reliability at the end of the 35th launch?
Sequential Success/Failure Data with Modes
Launch Number Result Mode
1 F 2
2 F 1
3 S
4 F 3
5 F 3
6 S
7 S
8 S
9 F 2
10 S
11 F 1
12 S
13 S
14 S
15 S
16 S
17 S
18 S
19 S
20 S

Solution

1. The next figure shows the entered data and the estimated parameters.

2. The next figure displays the Reliability vs. Time plot.

3. The next figure displays the number of launches before the reliability goal of 99.5% will be achieved.

4. The last figure displays the reliability after the 35th launch.

## Automobile Transmission Example

The following table presents the reliabilities observed monthly for an automobile transmission that was tested for one year.

1. Find a Logistic reliability growth curve that best represents the data.
2. Plot it comparatively with the raw data.
3. If design changes continue to be incorporated and the testing continues, when will the reliability goal of 99% be achieved?
4. If design changes continue to be incorporated and the testing continues, what will be the attainable reliability at the end of January the following year?
Reliability Data
Month Observed Reliability(%)
June 22
July 26
August 30
September 34
October 45
November 58
December 68
January 79
February 85
March 89
April 92
May 95

Solution

1. The next figure shows the entered data and the estimated parameters.

2. The next figure displays the Reliability vs. Time plot.

3. Using the QCP, the next figure displays, in months, when the reliability goal of 99% will be achieved.

4. The last figure shows the reliability at the end of January the following year (i.e., after 20 months of testing and development).


text:
# How Strong is an Egg?

You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. What is the minimum number of tries needed to find out the solution?

-
@Dennis: You can have more than two tries: an egg doesn’t necessarily break when you drop it. –  Brian M. Scott Oct 22 '12 at 12:28
@Dennis: Of course, we probably are to assume that a successful drop doesn’t weaken the egg, which seems rather unlikely! –  Brian M. Scott Oct 22 '12 at 12:30
@GiovanniDeGaetano: You've proven that the minimum number of tries is $\leq 20$. In fact, if you go through your argument carefully, I think you actually get an upper bound of $19$. [Worst case: try floors $10, 20, \dots, 90, 91, 92, \dots, 99, 100$. I think you have to try floor $100$ in case it lands unbroken from floor $99$ since you aren't told that you know it will definitely break if dropped from floor $100$.] But you might be able to get a bit better by testing $\sqrt{M}$ floors above your previous one, where $M$ is the number of remaining steps. –  Michael Joyce Oct 22 '12 at 13:06
1. The egg breaks, and you have one egg to test for the remaining $k-1$ floors. By the first paragraph, this implies you will need $k$ moves in total. 2. The egg doesn't break; in this case, the first $k$ floors don't matter, and you are playing with 2 eggs and $100-k$ floors, and thus you need $1+f(100-k)$ moves in this case. So this should let you code a solution to the problem. –  only Oct 22 '12 at 13:16
The answer is $0$: If you drop an egg onto the pavement below from a first-floor (or higher) window, then it will break. –  John Bentin Oct 22 '12 at 13:29

Now that you have got the answer by yourself, let me post what I was going to, as well. (A slow formal proof that $14$ is the minimum, and the answer for general $N$ in place of $100$.)

Just to be clear, the assumption in the problem is that all answers are possible, from $0$ to $100$ inclusive: it is possible the egg breaks when dropped from the very first floor itself, it is possible the egg can survive a fall from even the $100$th floor, and everything in between. (Also, the result of a fall is either that the egg breaks, and can no longer be used, or that it doesn't break and the fall has no effect on it whatsoever.)

Let us first solve the problem where you have only one egg. Then it should be clear that the only solution is to drop it from the first floor, then if it doesn't break drop it from the second floor, and so on up to $100$ floors. [Proof: Suppose you first drop the egg from a height $h_1$, then if it doesn't break you drop it from a height $h_2$, and so on. Then,

• $h_1$ must be $1$. Because if $h_1 > 1$, and it breaks when you drop it from height $h_1$, then you have the egg no more, and have no way of distinguishing between the potential answers $0, \dots, h_1-1$.
• $h_2$ must be $h_1 + 1$, and in general $h_{n+1} = h_n + 1$, for a similar reason: if the egg breaks when you drop it from $h_{n+1} > h_{n} + 1$, then you have no way of distinguishing between the potential answers $h_{n}, \dots, h_{n+1}-1$. So $h_1, h_2, h_3, \dots$ are $1, 2, 3, \dots$ respectively. $\Box$]

So now with two eggs, suppose you drop it from a height $h_1$, then if it doesn't break you drop it from a height $h_2$, and so on. (Obviously to be optimal this will be an increasing sequence, since if the egg doesn't break when dropped from some height, it is never necessary to drop it from a smaller height as you already know the result.) For convenience, denote $h_0 = 0$. If on some drop $h_{n+1}$ the egg breaks ($n \ge 0$), then you are left with the task of distinguishing between the possible answers $h_n, \dots, h_{n+1}-1$ with just one egg, which by the reasoning of the first part above, takes (up to) $h_{n+1} - h_{n} - 1$ drops (basically you drop the egg from $h_{n} + 1$, then from $h_{n} + 2$, and so on up to $h_{n+1} -1$). So the total number of drops needed in this scenario is $n+1$ (for the drops $h_1$ to $h_{n+1}$) followed by $h_{n+1} - h_{n} - 1$ drops, for a total of $n + 1 + h_{n+1} - h_{n} - 1$, namely $n + h_{n+1} - h_{n}$ drops (where $n\ge 0$). In the worst case, we will incur the maximum cost of this over all $n$, and that is what we want to minimize: we want to minimize \begin{align}\max( &0 + h_1,\\ &1 + h_2 - h_1, \\ &2 + h_3 - h_2, \\ &\dots,\\ &n + h_{n+1} - h_{n})\end{align} where $n$ now is such that $h_{n+1} = 100$ (if your egg never breaks, you'll keep using the first egg until you drop it from the $100$th floor, so we can wlog assume that the $h_i$s form a finite sequence ending with $100$). Note that the sum of all these quantities telescopes, and it is $\frac{n(n+1)}{2} + 100$. So since the sum of $n+1$ numbers is that much, the largest of them is at least $\frac{1}{n+1}$th of it, namely $$\frac{1}{n+1}\left(\frac{n(n+1)}{2} + 100\right) = \frac{n}{2} + \frac{100}{n+1} \ge 10\sqrt{2} - \frac12 \approx 13.6,$$ so we need at least $14$ drops.

And the method for actually achieving $14$ drops suggests itself: to make the maximum equal when the sum is fixed, the general way is to make all of them as equal as possible, which suggests we can take $h_1 = 14$, then $h_2 - h_1 = 13$ (so $h_2 = 14 + 13 = 27$), then $h_3 = 14 + 13 + 12$, and so on up to $h_{11} = 14 + 13 + \dots + 4 = 99$, and then $h_{12} = 100$.

(There are many other solutions, e.g. $h_1 = 7$, then $h_2 = 7 + 13$, $h_3 = 7 + 13 + 12$ and so on up to $h_{14} = 7 + (13 + 12 + \dots + 2 + 1) = 100$, but the salient fact is that $13 + 12 + \dots + 2 + 1 = 91 < 100$, while $14 + 13 + \dots + 2 + 1 = 105 > 100$. If instead of $100$ we were given $105$, the answer would still be $14$, and the method would be unique.)

Of course, we did not here use any special property of $100$, and repeating the above argument for general $N$ shows that the number of steps needed is: $$\left\lceil \sqrt{2N} - \frac{1}{2} \right\rceil$$

A simpler alternative way of saying this is: $$\text{the smallest number n such that \frac{n(n+1)}{2} \ge N.}$$

-
A simpler argument than the above would have been to calculate what's the largest $N$ for which we can solve the problem in at most $n$ drops, and we'd have found $N$ to be $1 + 2 + \dots + n = \frac{n(n+1)}{2}$. –  ShreevatsaR Oct 23 '12 at 13:08
Note: On the face of it the two expressions look different (the second one algebraically gives $n = \left\lceil \sqrt{2N + \frac14} - \frac{1}{2} \right\rceil$), but because for integer $n$ we have $\frac{n(n+1)}{2}$ also an integer, we can see that $$\frac{n(n+1)}{2} \ge N \iff \frac{n(n+1)}{2} \ge N - \frac18 \iff n \ge \sqrt{2N} - \frac12,$$ so they are the same. –  ShreevatsaR Oct 23 '12 at 13:23
what if the egg hatches in between, did you take that possibility into account?? :):) –  dineshdileep Oct 23 '12 at 13:25
(btw, very nice proof!) –  dineshdileep Oct 23 '12 at 13:25

I found the solution. Here it is:

The easiest way to do this would be to start from the first floor and drop the egg. If it doesn’t break, move on to the next floor. If it does break, then we know the maximum floor the egg will survive is 0. If we continue this process, we will easily find out the maximum floors the egg will survive with just one egg. So the maximum number of tries is 100 that is when the egg survives even at the 100th floor.

Can we do better? Of course we can. Let’s start at the second floor. If the egg breaks, then we can use the second egg to go back to the first floor and try again. If it does not break, then we can go ahead and try on the 4th floor (in multiples of 2). If it ever breaks, say at floor x, then we know it survived floor x-2. That leaves us with just floor x-1 to try with the second egg. So what is the maximum number of tries possible? It occurs when the egg survives 98 or 99 floors. It will take 50 tries to reach floor 100 and one more egg to try on the 99th floor so the total is 51 tries. Wow, that is almost half of what we had last time.

Can we do even better? Yes we can. What if we try at intervals of 3? Applying the same logic as the previous case, we need a max of 35 tries to find out the information (33 tries to reach 99th floor and 2 more on 97th and 98th floor).

Interval – Maximum tries

1  – 100
2  – 51
3  – 35
4  – 29
5  – 25
6  – 21
7  – 20
8  – 19
9  – 19
10 – 19
11 – 19
12 – 19
13 – 19
14 – 20
15 – 20
16 – 21

So picking any one of the intervals with 19 maximum tries would be fine.

Instead of taking equal intervals, we can increase the number of floors by one less than the previous increment. For example, let’s first try at floor 14. If it breaks, then we need 13 more tries to find the solution. If it doesn’t break, then we should try floor 27 (14 + 13). If it breaks, we need 12 more tries to find the solution. So the initial 2 tries plus the additional 12 tries would still be 14 tries in total. If it doesn’t break, we can try 39 (27 + 12) and so on. Using 14 as the initial floor, we can reach up to floor 105 (14 + 13 + 12 + … + 1) before we need more than 14 tries. Since we only need to cover 100 floors, 14 tries is sufficient to find the solution.

Therefore, 14 is the least number of tries to find out the solution.

-
I understand your argument that it can be done in 14 tries, but why exactly is that the least number? –  Jason DeVito Oct 23 '12 at 12:07
@JasonDeVito Using 14 as the initial floor, we can reach up to floor 105 (14 + 13 + 12 + … + 1) before we need more than 14 tries. –  Jaguar Oct 24 '12 at 3:38
I understand that 14 works. What I was wondering is why, say, 13 wouldn't work. Obviously 13 wouldn't work with your chosen strategy, but who's to say there isn't some crazy approach where $13$ is sufficient? –  Jason DeVito Oct 24 '12 at 12:23
The critical strip of eggs is the interval $C:=[k,k+1]$ such that, when an egg is dropped from a height $\leq k$ it survives, and when it is dropped from a height $\geq k+1$ it brakes.
The numbers $$h_r(n)\qquad(r\geq0,\ n\geq0)$$ ("allowed length for $r$ eggs and $n$ trials") are defined as follows: If we know that $C$ lies in a certain interval of length $\ell\leq h_r(n)$ we can locate $C$ with $r$ eggs in $n$ trials, but if we know only that $C$ lies in a certain interval of length $\ell>h_r(n)$ then there is no deterministic algorithm that allows to locate $C$ with $r$ eggs in $n$ trials for sure. Obviously $$h_0(n)=1\quad(n\geq0)\ ,\qquad h_r(0)=1\quad(r\geq0)\ .$$ The numbers $h_r(n)$ satisfy the recursion $$h_r(n)=h_{r-1}(n-1)+h_r(n-1)\qquad(r\geq1,\ n\geq1)\ .\qquad(*)$$ Proof. Assume $C$ lies in a certain interval $I$ of length $\ell:=h_{r-1}(n-1)+h_r(n-1)$. We may as well assume that the lower end of $I$ is at level zero. Drop the first egg at height $h_{r-1}(n-1)$. If it brakes then $C$ is contained in the interval $[0,h_{r-1}(n-1)]$ and can be located with the remaining $r-1$ eggs in $n-1$ trials. If it survives then $C$ is contained in the interval $[h_{r-1}(n-1),\ell]$ of length $h_r(n-1)$ and can be located with the $r$ eggs in $n-1$ trials. This proves $h_r(n)\geq\ell$.
Conversely, assume that we know only that $C$ lies in a certain interval of length $\ell'>\ell$ and that there is an algorithm that locates $C$ with $r$ eggs in $n$ trials. This algorithm would tell us the height $k$ at which we should drop the first egg. If $k>h_{r-1}(n-1)$ and the egg brakes or if $k\leq h_{r-1}(n-1)$ and the egg survives it would be impossible to finish the task, as the remaining interval that contains $C$ is larger than allowed for the remaining resources. It follows that $h_r(n)\leq\ell$.
From $(*)$ we obtain $$h_1(n)=n+1\ ,\quad h_2(n)={1\over2}(n^2+n+2),\quad h_3(n)={1\over6}(n^3+5n+6)\qquad(n\geq0)\ .$$ As $h_2(13)<100<h_2(14)$ we need at least $14$ trials to locate $C$ (or eliminate $C\subset[0,100]$) in the original setup.


text:
# All Questions

33 views

### one complex password as a “seed” for localy generated per-service passwords

I've stumbled upon a project that suggests a way of having to remember one password, from which a “per-service password” could be generated by salting the service name using scrypt. What could be a ...
30 views

55 views

### Enigma algorithm Question about the Ringstellung

This might be a stupid question but I need to implement the Enigma algorithm and I don't fully understand how it works. I've googled the subject and I am confused about what the Ringstellung is and ...
31 views

### Outsourced Multiparty computation proof in Ideal world

I need to know in an outsourced two party computation where honst $A$ and $B$ outsource their private and secure data to a malicious server, why we need to design a simulator that interacts with an ...
46 views

### Role of trusted party in the Ideal model in Malicious case

Imagine there is a protocol supporting outosurced multi party computation. There are three parties involved in the protocol: client $A$, client $B$ and a server. Client $A$ and $B$ send their private ...
59 views

### Security of a custom non linear hill cipher

Initially let me state that this is an atypical type of cryptographic encoding. First I break up my key into three parts $k = {W,\overrightarrow{b},\alpha}$. the $W$ is simply a $n \times n$ matrix, ...
50 views

### How to map a handful of numbers in a large range to a much smaller range deterministically without collissions

I want to map a set of long integers (say around 100 different values) that can span the entire 64 bit integer range to a much smaller range such as from 0 to 25000 deterministically with almost zero ...
30 views

### Does “identity-based dynamic threshold signature” exist and could such scheme contain a “Signature Combination” algorithm?

I came across [1] and I'm very puzzled by this paper. They use a building block which they call "identity-based dynamic threshold (IBDT) signature", citing paper [2]. First of all [2] does use this ...
71 views

### How do I prove IND-CPA security of RSA-OAEP?

How do I prove that RSA-OAEP is IND-CPA secure? It would be very good to show how to prove it formally, but an informal proof would also be enough. Because of the random number in RSA-OAEP, RSA gets ...


text:
# C++ syntax errors

This topic is 3330 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi there. Lately, i have wanted to learn C++ to create video games, and I got this book called "Begging C++ through game programming, second edition" by Michael Dawson. Anyways, in chapter 2, the book told me how to create a number guessing game where i guess the number the computer randomly generates. At the end of the chapters, we are given exercises to create modifications of the example programs used, and one was to create a mod of the number guessing game where the computer and human switch roles in where the computer guesses. In Dev-C++ 4.9.8 (I think that's the version) I keep on getting these errors: And this is the source for the program (ignore the dashes): ------- // Guess my Number 2.0 - Comp guesses // The classic number guessing game, with a twist #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int theNumber; cout << "\tWlcome to Guess My Number 2.0\n\n"; cout << "Enter a number for the computer to guess (from 1 to 100): "; cin >> theNumber; // Let the user start when he wants cout << "Okay, were going to start soon.\n\n"; system("PAUSE"); cout >> "GO!!\n\n\n"; char answer; while (answer == n) { rand(time(0)); // seed random number genrator int guess = rand() % 100 + 1; // the computer guesses the number cout << "Computer: Is your number: " << guess << "? (y/n)\t"; cin >> answer; if (guess == (theNumber && (answer == n))) { cout << "YOUR LIEING!!!" << endl; cout << "I know the number is " << guess << "!" << endl; cout << "I can see it in your eyes!" << endl; cout << "Play fair next time." << endl; } } cout >> "\n\nSo " << theNumber << " was your number after all.\n" << endl; cout >> "Good game." system("PAUSE"); return 0; } -------- That IF statement in the WHILE statement was something I wanted to put in if the human entered no even if the computer was right. It was not said to be entered by the book, just have the human and computer swap roles from the original number guessing game. Any help is appreciated to why i get these errors. ~Thanks.

##### Share on other sites
It helps if you use source tags and show us what lines have errors.

Half the time you write "cout <<", the other half "cout >>"

You need to pay closer attention.

##### Share on other sites
The first issue is that you're using Dev-C++, which is considered by just about everyone to be an outdated and buggy tool. Download Visual C++ Express 2008 and you'll find the experience to be much better.

Second, I can notice from your code that you use rand(time(0)) to seed the random number generator, when you actually meant to type srand, which is the seed function.

Third, your if statement most likely won't do what you want it to do. It's going to evaluate the inner expression as a boolean and then compare the guess to true or false. I don't think that's what you intended. Drop all the extra parenthesis in there and things should work out correctly.

##### Share on other sites
(I haven't programmed in c++ in a while but these lines seem wrong)

You declare answer and then immediately check it without initializing it(giving it a value), and it doesn't look like you give a value in any reachable code.
The next line is comparing it to "n" which I don't see declared anywhere. If you're trying to get the character n you need to use 'n' instead.

##### Share on other sites
Quote:
 Original post by PseudokaiYou declare answer and then immediately check it without initializing it(giving it a value), and it doesn't look like you give a value in any reachable code.
The assignment is in the while loop. The OP wants to use a do..while loop instead to avoid the quoted problem.

The biggest mistake I see is:

cout << "YOU'RE LYING!!!"

[wink]

##### Share on other sites
Quote:
 Lately, i have wanted to learn C++ to create video games

Welcome to the dark side :)

Quote:

You should initialize answer to some value before using. Also, as Pseudokai pointed out, to see if a char variable is equal to some specific letter, put the letter inside single quotes.

char answer = 'n';while(answer == 'n');

Quote:
 rand(time(0)); // seed random number genrator

You only need to do this once at the start of the program rather than inside the loop.

Quote:
 int guess = rand() % 100 + 1; // the computer guesses the number

This could potentially take a while before it hits your number. Although this is fine for now you may want to lookup binary search when you start feeling more comfortable with the language.

Quote:
 if (guess == (theNumber && (answer == n)))

As with previous comment about the start of the loop, remember to compare answer to 'n'. Also the brackets are mixed up a bit here. What this does is compare answer to n ('n') which results in a true/false value. Then it does 'theNumber != 0' (the long version of putting just theNumber) which also results in a true/false value. Then it checks if both of those 2 values are true which results in a 3rd true/false value. It then compares that final true/false to the value of guess. That probably isn't what you want :)

// if guess is equal to theNumber and answer is equal to the letter nif((guess == theNumber) && (answer == 'n'))

Also, immediately after the last cout statement in that block I would add a 'break;' to exit the loop there.

Hope this helps.

##### Share on other sites
hehe, a interesting small game!

##### Share on other sites
I thank you all for your replies.

And that cin <<>> cout thing is a constant typo for me.

Anyone known a good pneumonic aid to help remember which one to use?

##### Share on other sites
Quote:
 Original post by CuddleBunniezzz12I thank you all for your replies.And that cin <<>> cout thing is a constant typo for me.Anyone known a good pneumonic aid to help remember which one to use?

I think of it this way... They point to where you are sending data. So for cout, you are sending data to the Ostream called cout, so it is

cout << "blah blah" << endl;

But, if you are reading data in, you are sending it to a variable, so it is

cin >> x;

Just point the arrow whichever way you want the data to flow.

Thats how I think of it anyway.

##### Share on other sites
Quote:
Quote:
 Original post by CuddleBunniezzz12I thank you all for your replies.And that cin <<>> cout thing is a constant typo for me.Anyone known a good pneumonic aid to help remember which one to use?

I think of it this way... They point to where you are sending data. So for cout, you are sending data to the Ostream called cout, so it is

cout << "blah blah" << endl;

But, if you are reading data in, you are sending it to a variable, so it is

cin >> x;

Just point the arrow whichever way you want the data to flow.

Thats how I think of it anyway.

Yeah that's the way I see and think of it too I don't use any mnemonics, besides if you keep practicing your C++ you won't need any!

p.s. And ditch dev-c++ as has been suggested. I guess you are using the older 1st edition of book since I think I saw newer 2nd in bookstore and now it suggest you use visual express instead I think no?

##### Share on other sites
I'm having trouble with my "While" loop.

I get two errors in Dev C++ (I'm going to eventually pick up Visual C++ 2008 Express, but I'm too busy).

They are line 34, the two messages i get are  and (Each

I also added a new if statement for in case the user picks a number that is not 1 - 100.

// Guess my Number 2.0 - Comp guesses// The classic number guessing game, with a twist#include <iostream>#include <cstdlib>#include <ctime>using namespace std;int main(){    srand(time(0)); // seed random number genrator    int theNumber;        cout << "\tWlcome to Guess My Number 2.0\n\n";        cout << "Enter a number for the computer to guess (from 1 to 100): ";    cin >> theNumber;        if ((theNumber < 1) || (theNumber > 100))    {        cout << "Sorry, that number won't work, try one that is from 1 to 100.";        cin >> theNumber;    }        // Let the user start when he wants    cout << "Okay, were going to start soon.\n\n";    system("PAUSE");        cout << "GO!!\n\n\n";        char answer = 'n';    while (answer == n)    {        int guess = rand() % 100 + 1;  // the computer guesses the number                cout << "Computer: Is your number: " << guess << "? (y/n)\t";        cin >> answer;                if ((guess == theNumber) && (answer == n))        {                cout << "YOU'RE LYING!!!" << endl;                cout << "I know the number is " << guess << "!" << endl;                cout << "I can see it in your eyes!" << endl;                cout << "Play fair next time." << endl;        }    }        cout << "\n\nSo " << theNumber << " was your number after all.\n" << endl;    cout << "Good game.";        system("PAUSE");    return 0;}

##### Share on other sites
Please put single quotes around the n in
while (answer == n)
and
if ((guess == theNumber) && (answer == n))

Also, the number to guess can be out of range. Test it by putting two numbers out of range in the program. It accepts the second number. To solve this use:
while ((theNumber < 1) || (theNumber > 100))
if ((theNumber < 1) || (theNumber > 100))`
. This new code keeps asking for a new value, if the previous value was out of range.

Emiel1

PS: Nice idea to change roles with the computer!


text:
## Problem:

Exercise 5.2.1 from Wagner's Book: implement myMapThread in terms of Thread/Apply such that it works with the Power/Equal examples below.

## My Attempt:

In[3]:= myMapThread[func_, list_] :=
myMapThread[Equal, {{1, 2, 3}, {1, 2, 4}}]

Out[4]= {a^3, b^3, c^3}

Out[5]= False

myMapThread[Equal, {{1, 2, 3}, {1, 2, 4}}]

Out[7]= {a^b^c, 3}

Out[8]= {False, False}

## Question

1) I screwed up. What is the correct answer?

2) What am I doing wrong?

-

You were doing it right, but Equal is peculiar in that it is also defined on lists, and returns single False if the lists are not exactly equal, and single True if they are. During the evaluation of myMapThread (say, with a generic function f), there is a stage like this:

(f@@#)&[{{1,2,3},{1,2,4}}]

(*  f[{1,2,3},{1,2,4}]  *)

And if you have Equal in place of f, it evaluates at this stage, before Thread has a chance to execute. In fact, Wagner emphasized this point in his main text, and I also discussed this here.

This is how I would do this: use Apply at level 1:

myMapThreadLS[f_, arg_List] := f @@@ Thread[arg];

This avoids this problem, since threading is guaranteed to happen here before the function is applied. To cure your version, there are probably better alternatives, but one which comes to mind right now is to use a dummy symbol without rules attached to it, in place of the function being applied, and substitute it with that function at the end:

myMapThreadAlt[func_, list_] :=
Module[{f},
Thread[(Apply[f, #] &)[list]] /. f -> func];

But, if you look at it, essentially this is doing the same as my shorter solution above, just in a slightly more complex way.

EDIT

Here is another way, which utilizes pattern-matching, and is closer to Wagner's discussion in the main text:

myMapThread2[f_, {parts__}] := Thread[Unevaluated[f[parts]]]

This has an advantage that you don't need two traversals of the threaded argument list, since pattern-matching is used to inject the list parts directly as a sequence, and then Apply is not needed.

-
Very nice. Thanks! I like the f @@@ Thread[arg] solution. – user1602 Jul 16 '12 at 9:20
one more question. Where in "?Thread", does it suggest that "Thread[{{a, b, c}, 3}]" is valid use of Thread? it seems to imply we need Thread[f[{{a,b,c}, 3}]] – user1602 Jul 16 '12 at 9:21
@term-rewritica Glad I could help, and thanks for the accept. As to your question: Thread[{{a, b, c}, 3}] is just Thread[List[{a, b, c}, 3]], if you recall that everything is an expression and {a,b,c} is List[a,b,c] (for example), so this is perfectly valid. – Leonid Shifrin Jul 16 '12 at 9:25
Darn, you got both forms. +1 :^) – Mr.Wizard Jul 16 '12 at 17:22
@Mr.Wizard Well, I knew that if I leave any chance for another (not too exotic to be off-topic) solution, you'd take it :-). Thanks for the upvote. – Leonid Shifrin Jul 16 '12 at 17:28


text:
# Steady-State AC Response of RL Circuits

Discussion in 'Homework Help' started by TheBloke, May 23, 2014.

1. ### TheBloke Thread Starter New Member

May 23, 2014
2
0
Hi,
Wondering if anyone can help me out with determining expression for the resistor voltage and inductor voltage, with an AC input 5V (RMS) ??

Any help is much appreciated

Feb 17, 2009
3,957
1,097
3. ### TheBloke Thread Starter New Member

May 23, 2014
2
0
Yes in Series
Thanks for the reply, I have used the equations you have provided, and I am trying to plot the magnitude of the voltage VR and VL against the frequency, however, even though the source is 5v (RMS) I am seeing answers as high as 50V......
Any idea?
Thanks

4. ### Jony130 AAC Fanatic!

Feb 17, 2009
3,957
1,097
Or show us your work so we can check it.

5. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,388
497
If they are in series, it is just a voltage divider.

Replace inductor with its impedance, now you have a voltage divider formed by two "resistors":
Vresistor=5[R/(R+Zinductor)]
Vinductor=5[Zinductor/(R+Zinductor)]

As you can see the denominator is always larger than nominator. So you will always have a number smaller than 1 in the square brackets. Then you multiply this number by 5 and you will have result that is smaller than 5.
Example.
Let us say that you have:
R=1 kOhm
Zinductor= 100j
V= 5 V
Then:
Vresistor=5[1k/(1k+100j)]=4.95-0.495j
|Vresistor|=4.975 V
Vinductor=5[100j/(1k+100j)]=0.0495+0.495j
|Vinductor|=0.497 V

Also note that increasing the frequency will increase denominator even more. So there is no way for you to exceed 5 volts.

6. ### WBahn Moderator

Mar 31, 2012
17,737
4,789
It would help if you showed your work. Otherwise you are expecting use to be mind readers (i.e., guess), when if you simply showed your work we could determine where you are going wrong. Doesn't that sound like a better approach?


text:
# Homework Help: Fourier series - DC component, integration problem

1. Apr 16, 2013

### DrOnline

1. The problem statement, all variables and given/known data

Find the Fourier series representation of:

f(t)={-t , -∏<t<0
f(t)={0 , 0<t<∏

This is a piecewise function.

T=2∏ (the period)

2. Relevant equations

$$a_{0}=\frac{2}{T}*\int_0^T f(t),dt$$

3. The attempt at a solution

I need help only with calculating the DC component. Once I get that working, I can continue on my own. Tried multiple times, I keep getting pi/2.

The correct answer should be pi/4.

This is my graph:

Is this graph correct?

I consider the area of the function from -pi to 0 identical if I change it from:

f(t)=-t -∏<t<0

to

f(t)=t 0<t<∏

Is this permitted? Surely it's the same result. Seems alright to me

$$a_{0}=\frac{2}{2\pi}*\int_0^∏ -t,dt$$

$$a_{0}=\frac{1}{\pi}*(\frac{\pi^2}{2}-0)$$

$$a_{0}=\frac{\pi}{2}$$

And the book says it should be pi/4.

What am I doing wrong? Is my graph correct? Is my integration correct? Is the book's solution wrong?

2. Apr 16, 2013

### DrOnline

I think I figured it out.... my a0 seems correct to be ∏/2,

but when I type out the actual Fourier series, the formula is:

a0/2, making it ∏/4.

If anybody wants to confirm my thinking, that would be helpful!

3. Apr 16, 2013

### LCKurtz

Textbooks are not consistent on the formula for $a_0$ because some formulas assume the constant term in the series is $a_0$ and some use $\frac {a_0} 2$, which causes the formula for $a_0$ to differ by $2$. As long as you are consistent, you should be OK. But there is no need to go to a different interval than that where the function is given. If the constant term of the series is $a_0$ and the period is $2p$ then$$a_0 = \frac 1 {2p}\int_{-p}^p f(t)\, dt = \frac 1 {2\pi}\left(\int_{-\pi}^0 -t\, dt +\int_{-\pi}^0 0\, dt\right) = \frac \pi 4$$

4. Apr 16, 2013

### DrOnline

Thank you for helping me with this!

I think perhaps an error has snuck into your maths though, because you write:

$$a_{0}=\frac{1}{2p}.........=\frac{1}{2\pi}......$$

But p=2∏, so it should be $$a_{0}=\frac{1}{4\pi}$$ using your formula.

Can you comment on this?

I understand how there are different formulas though, as you say, when I created the question I hadn't realized that I had to divide it by 2 again, but when I did I wanted somebody to confirm my logic.

I also understand, of course, that I don't have to tinker with the range and function, but that saved me having to deal with negative values etc, I should stick with the actual function though, I have to be at a level where that kind of thing doesn't phase me.

5. Apr 16, 2013

### LCKurtz

No, I said the period was $2p$ so $p=\pi$ in your case. And when you do the integral you will have a $t^2$ in the numerator with a limit of $-\pi$ which will give a $\pi^2$ in the numerator.

6. Apr 16, 2013

### DrOnline

Yes of course, I was too quick in reading there, thanks again!

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted


text:
# 50% interval of observations in a Gaussian distribution

In the one sigma interval around the mean (i.e., one standard distribution) fall 68.2% of the observations.

In which interval would exactly 50% of the observations fall?

-
Use a table of the normal distribution function $\Phi(x)$ to figure out the solution to $\Phi(x) = 0.75$. The (shortest of many possible) interval you seek is $(-x,x)$. –  Dilip Sarwate Dec 24 '12 at 23:36
... to which the OP will have to add the mean. –  Stephan Kolassa Dec 25 '12 at 19:55
@StephanKolassa Actually, following the sense of the OP's statement: taking "one sigma interval around the mean" to mean that $68.2$% of the probability mass lies within one standard deviation from the mean, the value of $x$ that is the solution to $\Phi(x)=0.75$ should be taken to mean that $50$% of the probability mass lies within $x$ standard deviation from the mean. –  Dilip Sarwate Dec 26 '12 at 1:12