text:
# All Questions

1,161 questions
Filter by
Sorted by
Tagged with
18 views

### Meta puzzles that don't state the puzzles they rely on - adding difficulty or just wasting time

I am currently posting some meta puzzles, and originally planned to not mention the previous puzzles. I would then elude to it being related to another puzzle in a clue. Is this just increasing the ...
34 views

### Minesweeper problems

It looks like the minesweeper tag has so many non-puzzle questions. What shall I do with them? Also, is this question fit for the "puzzling"site?
26 views

### What happens with the questions with no accepted answer?

There are many questions in PSE with a few answers (or sometimes no answers at all) which do not yet have any accepted answer with tick mark even though many weeks or months have passed. Shouldn't the ...
42 views

### Disputes about content on question?

I asked for help on the website for a question and I gave out more context to it but instead my question was locked until further notice. Why?
139 views

### Is my timing of giving hints good?

Starting with this question, I shall give hints on specific timing. After 24 hours since posting the question, I give a subtle hint. After other 12 hours, I give a moderate hint. After other 6 hours, ...
101 views

### Filtering by difficulty would allow to extend the user base of the main site

Currently the main site is used mostly by community who create/post puzzles and write answers to them. It is possible to use the site just to solve puzzles and to check solutions against existing ...
260 views

### Enigmatic Puzzle - Eliminate Wrong Paths

I'm solving an enigmatic-puzzle, in particular, this. If I found routes that ended up in a dead-end, but which I am sure that was deliberately added in by the puzzle creator, should I post them as an ...
213 views

### Rules for Using Puzzles Created Here

So I am new here and haven't heard anything about these puzzles being used anywhere else. There are a lot of nice cryptic crosswords and similar puzzles created by people here that would do very well ...
213 views

### User names with promotion/spam in them

To my knowledge, questions and answers that contain spam and promotional materials, such as to sell something or advertsting, are forbidden. But what if someone has a username like somecompany.com ? ...
410 views

### Puzzles whose creators have asked them not to be shared

It happens quite frequently that someone posts a question that's taken from, say, an online IQ test. (The most recent example I've seen is from this one.) Sometimes the question is posted without ...
87 views

### Math problems from a series of stories

I want to write a long story (one chapter per question) and some of the chapters may be just math problems. Where should I post those chapters? Or, may I make some changes to those math problems so ...
193 views

### What do we do when a question relies on an image that's no longer available?

This question was just bumped to the homepage by a user asking if the image, which was hosted externally and is no longer accessible, could be fixed. This raises an interesting dilemma in that we now ...
68 views

### Posting similarly worded questions on meta - how?

I was about to post the Q3 installment of the "best of" series when I was prevented by the system. It doesn't allows me posting because it recognizes the question to be a "duplicate" of some previous ...
256 views

### Best puzzles of 2019 Q2 (April - June)?

This question is part of the best-puzzle award series. What are your nominations for the best puzzles, here on Puzzling.SE, of the second quarter ( April / May / June) 2019? Suggested guidelines ...
134 views

### I can't use Imgur, I have to use Scratch instead

Instead of Imgur mazes, I have to create Scratch mazes because I can't access Imgur. However, can I still use imgur-maze in it or may I suggest another tag? EDIT: I tried:
61 views

### Is “grid-deduction” needed here?

Is "grid-deduction" needed here?
283 views

### Unsolvable puzzles

I'm curious about people's thoughts on puzzles that don't have a solution. I've seen a couple of these posted in the last few weeks (since I've been on the forum) and they tend to generate a lot of ...
322 views

### Google Earth Challenges - Should we keep them?

Background Welp, @Conifers has come up with a great idea: Google Earth Challenge. It received pretty good feedback, and therefore the OP went on to post more of them. @athin went on to post a ...
427 views

A while ago, consensus was reached that open-ended puzzles are no longer welcome on our site. That means, if a question has no absolute "best possible" answer, so that any answer could conceivably be ...
89 views

### Why do questions sometimes not appear immediately on the site after asking?

I saw that sometimes when I ask a new question it does not appear on the site immediately. It takes sometimes at least 2-3 minutes before appearing but still got a view. I keep on refreshing the ...
141 views

### Are puzzles that overthink their answers appropriate?

I wasn't quite sure how to phrase this, but I stumbled on this puzzle and was surprised to see the amount of thought going into it. The answer - that suspect 3 must have done it because the murder ...
293 views

I have forgotten the answer to one of my puzzles. What do I do? I find it quite remarkable that a similar post doesn't already exist here.
287 views

### Partial Answers and “List-of-Clues” puzzles

Puzzling is unique across the SE network for allowing "partial answers" -- that is, answers that aren't full answers to the questions, but just make some progress towards answering it. But recently, I'...
59 views

### Posting a partial answer [duplicate]

I was working on this puzzle which has 10 clues leading to a single final answer: A puzzle with 10 pieces - 2 days to complete Over a day had passed with no activity so I posted an "answer" which ...
359 views

### Let's write a proper “Read Me First”

Our site has a lot of rules. One might even say, an awful lot. It would be a very good idea to list the most relevant of them in one place somewhere (the tour seems like a decent option) so that we ...
171 views

### Using images from elsewhere on the web

On PSE it is common for users to create puzzles using photographs or pictures taken from elsewhere on the web (e.g. here and here). Now, I like and enjoy this style of puzzle - it challenges your ...
307 views

### Why are IQ test questions received so badly on this website?

I have a question about my Puzzling Stack Exchange post: IQ test matrix: Can you solve it and justify your answer? I have asked a question about a Raven progressive matrix from an online IQ test and ...
44 views

### Posting a mini-puzzle for a hint for another puzzle

I created a $Word^{TM}$ kind of puzzle, and while trying to create a hint, I ended up with a mini-puzzle. Is it ok if I post it as a new question, to make it available not just for the people ...
318 views

### Use of profanity

This is a question about the use of profanity on the site. I am sure this must have been specified somewhere else. Obviously, abuse is not allowed. But profanity/cuss words can be used cleverly. I ...
80 views

### Are variations on puzzles with an accepted answer acceptable despite the hints they may give?

Assume a puzzle $A$ has an accepted answer. It gives you an idea for another puzzle $B$, in which you would, in fairness, include a sentence like "this was inspired from puzzle $A$". Then of course ...
215 views

### What's the difference between the tags [arithmetic] and [calculation-puzzle]?

I was seeking into tags until I found these tags: calculation-puzzle which states "A puzzle that involves numerical calculations, such as multiplication and addition." arithmetic which states: "...
118 views

### Description for “this looks like a puzzle you found elsewhere” assumes you can vote to re-open

I saw a question closed as this: "This looks like a puzzle you found elsewhere. For content you did not create yourself, proper attribution is required. If you have permission to repost this, ...
224 views

### Little Lost Robot Discussion

I asked this question recently. There were many answers, and it was accused of being too broad. I've been over the comments and the answers a few times, now. I'm not claiming it is perfect by any ...
102 views

### Why was my answer severely downvoted?

I posted this answer and it did okay at first, but later, it started to get a whole bunch of downvotes! This is now deleted so only certain viewers will be able to see it but what did I do wrong here? ...
76 views

### Would it be better to break the Grand Grid puzzles into multiple questions?

The first one was put into a single question because all the component challenges are related and are all required to solve it. But is it better to divide them up? Note that the first one was easier ...
207 views

I immediately got downvoted twice and am still downvoted 40 minutes later. I'm new so if anyone can let me know what I am doing wrong I would appreciate it. The Grand Grid I
197 views

### When does a (grid) puzzle genre have its own tag?

So I just realized there is a tag for nonogram. More browsing, there are tags minesweeper, mastermind, slitherlink, and other genres of grid puzzles (a.k.a grid-deduction) as well. Hmm.. There is ...
101 views

### Are puzzle suggestions on topic?

I've looked at the Help Center but I am still unsure about this one: Is a question that asks for suggestions on puzzles of a specific kind on topic here? As an example, the question I have in ...
73 views

### Is there a way to generate interest in old questions?

I'm new to Puzzling Stack Exchange and have found I can learn a lot by reading old puzzles and seeing how they were solved. I took an interest in one and posted an answer which was different to the ...
57 views

### Change 'graph-theory' tag name

We have a graph-theory tag which covers puzzles involving graphs, for example: Step into the Octagram but calling it 'graph-theory' is a bit prententious for a site called 'Puzzling'. May I ...
895 views

### Generalist Countdown

Since we are a relatively young site in the Stack Exchange network, we haven't been able to enjoy any Generalist badges at all. It's not that we don't have people that would qualify (we do), but that ...
263 views

### Should we change the [no-computers] tag to [no-brute-force]?

Usually when I see no-computers, it's used to deter people from using brute force. In my time here, I have only seen this tag used to exclude brute-forcing a solution with a computer. However, the ...
379 views

### Beginner: I'm finding most puzzles very difficult, if not downright obscure

Is this site more for a specific niche of people, or can anyone participate in solving the kinds of puzzles I've come across? Most seem to make very obscure references and wordplay that's inaccessible ...
506 views

### Congratulations Gareth! and the end of an era

Change is afoot! In the list of all users ranked by reputation. I've been #1 in that list, the highest-reputation user on Puzzling SE, since early 2015. But it seems the time has finally come to give ...
48 views

### What is the difference between situation tag and lateral-thinking tag?

When looking through the two tags descriptions and related questions, to me they seem to fall under the same category. They both set up a seemingly normal situation with some twist that requires ...
56 views

### Are questions about solution uniqueness or construction on topic?

Most of the questions on the main site are actual puzzles where the answers are guesses to those riddles, puzzles, rebus' etc. I've become interested in certain puzzles, such as battleships, ...
61 views

44 views

### Vote limit doesn't apply to comments

Earlier today I hit the 40-vote mark after going on a voting spree (I'd already gotten Vox Populi once). But I noticed that I could still vote on comments. How to reproduce: Vote the max 40 times in ...


text:
# Routine plotapprox

Graphical comparison between tabulated data and an approximating function.

### Description

This routine displays a graphical comparison between a set of samples $\left\{y_k\in\mathbb{R}^{n_1\times n_2}, k\in [1, N]\right\}$ obtained for different values $\left\{x_k\in\mathbb{R}^n,k \in [1, N]\right\}$ of some explanatory variables $x$, and an associated approximating function $f:\mathbb{R}^n\rightarrow\mathbb{R}^{n_1\times n_2}$. The local approximation error $f(x_k)-y_k$ is plotted for each entry and several indicators are computed to evaluate the accuracy of the approximation (see errapprox for a complete description).

### Syntax

plotapprox(X,Y,names,fdata{,options})
plotapprox(X,Y,names,flfr{,options})

### Input arguments

The first four input arguments are mandatory:

 X Values $\left\{x_k\in\mathbb{R}^n,k \in [1, N]\right\}$ of the explanatory variables $x$ ($n\times N$ array, where X(:,k) corresponds to $x_k$). Note that $n$ can only be equal to 1 or 2 in this routine. Y Samples $\left\{y_k\in\mathbb{R}^{n_1\times n_2}, k\in [1, N]\right\}$ ($n_1\times n_2\times N$ array where Y(:,:,k) corresponds to $y_k$ in the general case, or possibly $1\times N$ array where Y(k) corresponds to $y_k$ if $n_1=n_2=1$). names Names of the explanatory variables $x$ ($1\times n$ cell array of strings). fdata Values $\left\{f(x_k)\in\mathbb{R}^{n_1\times n_2},k \in [1, N]\right\}$ of the approximating function $f$ (same size as Y). flfr Linear fractional representation of the approximating function $f$ (GSS object if the GSS library is installed, LFR object otherwise if the LFR toolbox is installed).

The fifth input argument options is an optional structured variable with field:

 viewpoint This option is applicable only if 3-D graphs are to be displayed ($n=2$). It represents the deviation with respect to the default viewpoint. options.viewpoint(1) is the horizontal rotation in degrees about the z-axis, with positive values indicating counter-clockwise rotation. options.viewpoint(2) is the vertical elevation in degrees with positive values corresponding to moving above the graphs. The default value is options.viewpoint=[0 0].

lsapprox
olsapprox
qpapprox
tracker
koala
errapprox

format: plain


text:
Conditionally-Independent-Joint-Distribution

05-20-2022 || 15:51
Tags: #probability

conditionally-independent-joint-distribution

For a conditionally independent joint distribution, there are some variables which are dependent on each other and on the other hand, there are some variables which are independent. You can say it a partial dependency/indepedency.

As an example, if there are 3 random variables $(x_1, x_2, x_3)$ and $x_1$, $x_2$ are independent and $x_3$ depends on $x_1$ then the joint probability equation will be,

$$p(x_1, x_2, x_3) = p(x_1) p(x_2) p(x_3 | x_1)$$
if they can take, 2, 3, 4 variables respectively, then,

For $p(x_1)$, there are 2 parameters,
for $p(x_2)$, there are 3 parameters,
and for $p(x_3|x_1)$ there are 2 * 4 parameters

In total there will be 2 + 3 + 2 * 4 = 13 parameters.


text:
# Number of Graphs on n vertices without isolated vertices

1. Dec 18, 2007

### dobry_den

1. The problem statement, all variables and given/known data
What is the number of graphs on n vertices (V = {1,2,3,...,n} with no isolated vertices?

3. The attempt at a solution
I defined $$A_{i}$$ to be a set of graphs with the vertice "i" is isolated:

$$A_{i} = \left\{G=\left(V,E\right); \text{vertice "i" is isolated}\right\}$$

Then I used the Inclusion-Exclusion Principle to count all the "bad" graphs, i.e. those with any of the vertices isolated:

$$\left|\bigcup_{i=1,2,..,n}A_{i}\right| = \sum_{k=1}^{n}{(-1)^{k-1}\binom{n}{k}\cdot2^{\binom{n-k}{2}}$$

The last thing to do is to subtract this from the number of all graphs:

$$2^{\binom{n}{2}} - \sum_{k=1}^{n}{(-1)^{k-1}\binom{n}{k}\cdot2^{\binom{n-k}{2}} = \sum_{k=0}^{n}{(-1)^{k}\binom{n}{k}\cdot2^{\binom{n-k}{2}}$$

Do you think it's correct? Every help would be greatly appreciated!

Last edited: Dec 18, 2007


text:
# Can Quantum Jumps Same as Dimension Jumps ?

1. Jul 26, 2004

### Antonio Lao

Can Quantum Jumps Same as Dimension Jumps ???

By going back to Bohr's stationary orbits of electrons, The idea of quantum jumps was born.

We can hypothesize that matter such as electrons are 4D objects and photons are 3D objects and the continuous space between orbits is a 2D continuum. So what happens when one electron jumps from one orbits to another orbit is that the 4D electron transforms to 3D energy and the 3D energy transforms to a 2D continuum then 2D continuum back to 3D energy and then back to a 4D electron at a lower or higher orbit whichever the case in question. And transformation of 2D continuous space (S) is given by:

$$S = cE$$

where c is the speed of light in vacuum and it acts as dimension lowering constant for energy (E).

And by dimensional analysis, the 2D continuous space is proportional to an arbitrary surface area with the proportionality constant as force per unit of time. Futhermore force per unit time is proportional to the time derivative of acceleration with mass as the constant of proportionality.

$$\frac {Force}{time} = m \frac {\partial a}{\partial t}$$

Last edited: Jul 26, 2004
2. Jul 26, 2004

### Antonio Lao

If the surface area changes with time then the gradient of continuous space is given by

$$\nabla S = m \frac {\partial \vec{a}}{\partial t} \frac{\partial Area}{\partial t}$$

Futhermore for volume as a function of time, V(t) and given density $\rho$, the gradient of continuous space is given by

$$\nabla S = \frac {c^4 \rho_T}{\vec{r}} V(t)$$

Last edited: Jul 27, 2004
3. Jul 26, 2004

### Antonio Lao

If we can define the ratio of instantaneous density to total density of the universe as a function of time given by

$$\frac{1}{\rho_T} \int_{0}^{\infty} \rho_i (t) dt = 1$$

then the instantaneous density is the sum of kinetic density and potential density given by

$$\rho_i = \rho_k + \rho_p$$

If the total mass of the universe is the sum of total potential mass and total kinetic mass

$$m_T = m_k + m_p$$

then instantaneous kinetic and potential volumes can be related to the total volume given by

$$\frac{m_T}{m_p} - \frac{V_k}{V_p} \left ( \frac{V_T - V_p}{V_k - V_T} \right ) = 1$$

Last edited: Jul 26, 2004
4. Jul 26, 2004

### Antonio Lao

$$\frac{m_T}{m_p} \geq 1$$

and

$$\frac{V_k}{V_p} \left ( \frac{V_T - V_p}{V_k - V_T} \right ) < 1$$

if

$$\frac{m_T}{m_p} = 1$$

then

$$\frac{V_k}{V_p} \left ( \frac{V_T - V_p}{V_k - V_T} \right ) = 0$$

5. Jul 26, 2004

### Antonio Lao

$V_k$ is the same as the instantaneous volume of radiation. $V_p$ is the instantaneous volume of matter. $V_T$ is the total volume of the universe at each epoch.

6. Jul 28, 2004

### Antonio Lao

The gradient of continuous space becomes a function of instantaneous density and volume.

$$\nabla S = \frac{c^4}{\vec{r}} \int_{0}^{\infty} \rho_i (t) V(t) dt$$

From this, an integral force exist.

$$F = \frac{c^3}{\vec{r} \times \vec{r}} \int_{0}^{\infty} \rho_i (t) V(t) dt$$

7. Jul 28, 2004

### Antonio Lao

This force is infinitely large because the term $\vec{r} \times \vec{r} = 0$. But if the r's are orthogonal and comparable to Planck length then the force is just simply large. If orthogonal r's is very large then the force is small.

8. Jul 28, 2004

### Antonio Lao

Orthogonality seems to be a necessary condition for the force to exist. This implies that orthogonal forces must exist and the extremely high magnitude of this force must be able to quantize spacetime at the local infinitesimal region of a spacetime continuum.

9. Jul 28, 2004

### Antonio Lao

For low velocity and small mass and together with the invariance, $\vec{a} \cdot \vec{r} = c^2$, this force becomes Newton's 2nd law of motion.

10. Jul 28, 2004

### Antonio Lao

In post #7, the r's can become large only if the individual r's can be added collinearly together.

$$\vec{r} = \int_{0}^{\infty} \vec{r}_i$$

11. Jul 28, 2004

### Antonio Lao

Collinearity implies that $\vec{r} = \alpha \vec{r}_i$ where $\alpha$ is an integer.

12. Jul 28, 2004

### Antonio Lao

When the linear momentum is zero and when both density and volume are functions of energy and time, the square of mass is given by

$$m^2 = \int \int \frac{\partial \rho^2}{\partial t} \frac{\partial V^2}{\partial t} dt dt$$

13. Jul 28, 2004

### Antonio Lao

Furthermore, the square of mass is a new constant of nature given by

$$m^2 = \left( \frac{h}{ac} \right)^2$$

where h is Planck's constant, a is Planck length and c is the speed of light.

14. Jul 28, 2004

### Antonio Lao

Implication is the existence of real positive and negative root for mass given by

$$\pm \frac{h}{ac}$$

without the use of complex number.

15. Jul 28, 2004

### Antonio Lao

The use of these roots is to constraint the value of

$$\frac {V_k}{V_p} \left( \frac{V_T - V_p}{V_k - V_T} \right)$$

or

$$\frac {V_k}{V_p} \left( \frac{V_p - V_T}{V_T - V_k} \right)$$

so that the expressions are always less than unity.

16. Jul 31, 2004

### Antonio Lao

Why is the quantum of mass using $\pm \frac{h}{ac}$ numerically equal to the Planck mass using $\sqrt{\frac{hc}{G}}$?

If Planck's constant was determined first together with the speed of light and knowing the value of the Planck length, the value of the gravitational constant can be found by

$$G = \frac{a^2 c^3}{h}$$

17. Jul 31, 2004

### Antonio Lao

In a planetary system where one of the earthlike planets is in a perpetual cloud cover, the inhabitants will never be able to have the opportunity of seeing the starry night sky. In this planet, there could be no Galileo nor Kepler and then nor Newton before Maxwell's and Planck's discoveries. Yet the scientists of this planet can derive the laws of electromagnetism and also quantum mechanics first and then discover the law of universal gravitation afterward.

Although Einstein's theories of relativity can clinch the final constancy of the speed of light, these are not necessary for the first order determination of the gravitational constant.

Last edited: Jul 31, 2004
18. Jul 31, 2004

### Epsilon Pi

Quite clever example of different paradigms and how they will guide our quests in different ways, but I was wondering if you did choose those examples to be discovered first(Maxwell equations without the displacement current concept and Plank's discoveries) because in the last analysis they have to do with more fundamental laws of nature than those of gravitation?

Regards

EP

Last edited: Jul 31, 2004
19. Jul 31, 2004

### Antonio Lao

Epsilon Pi,

20. Aug 1, 2004

### Antonio Lao

I think all physical constants which are independent on other constants should appear in physical laws that are not depended on the sequential order of their discovery. For example, Planck's constant is depended on Boltzmann's constant therefore Boltzmann's constant must necessarily come first. Maxwell's theory of electromagnetism and quantum theory are in sequential order. One must follow the other since the later one uses some constants found in the earlier theory.

21. Aug 1, 2004

### Antonio Lao

Unresolve relationships between mass, volume and density for some particles

Planck mass=10e(-5) gram, volume=10e(-99) cm^3, density=10e(+94) g/cm^3
proton mass=10e(-24) gram, volume=10e(-39) cm^3, density=10e(+15) g/cm^3
electron mass=10e(-28) gram, volume=10e(-39) cm^3, density=10e(+11) g/cm^3
photon mass=0 gram (?), volume= ?, density= ?

22. Aug 1, 2004

### Antonio Lao

I am now reading Thomas S. Kuhn's 'The Structure of Scientific Revolutions' to get some ideas about paradigm shift.

23. Aug 1, 2004

### Epsilon Pi

A TOE a futile intent?

By reading and reading T.S.K, I was wondering if the quest for a TOE, is not a futile one after all?
In this respect he wrote, in his classical, when arguing against Popper's falsification argument:
"...no theory ever solves all the puzzles with which it is confronted at a given time; nor are the solutions already achieved often perfect. On the contrary, it is just the incompleteness and imperfection of the existing data-theory fit that, at any given time, define many of all the puzzles that characterize normal science. IF ANY AND EVEN EVERY FAILURE TO FIT WERE GROUND FOR THEORY REJECTION, ALL THEORIES OUGHT TO BE REJECTED AT ALL TIMES".(The Structure of Scientific Revolutions, p.146)

Must not we resolve then first the incommensurability problem we have between the existing paradigms, QM and GTR, before going with any intent? or at least making a great effort in this sense?

Just some inquisitive thoughts in my mind

Regards

EP

24. Aug 1, 2004

### Antonio Lao

If the derivation of a constant of a theory is independent from constants of other theories and furthermore if the theory can describe all other theories with consistency then this theory can be a TOE.

The theory of electromagnetism is the relative TOE to the theory of magnetism and the theory of electricity.

The theory of electroweak interaction is the relative TOE to the theory of electromagnetism and the weak nuclear force.

Although relative TOEs do exist, it is the belief that an absolute TOE can also exist. But as pointed out previously, the gravitational constant can be derived from knowing the speed of light and Planck's constant and maybe guessing by trials and errors the value of the Planck length (needed for determining some quantity of volume) which will require some sort of uncertainty principle (if the mass is quantized) between the concept of density and volume.

My hunch is that the resolution can simply be done in one dimensional space or the quantization of 1D space and 1D time.

The theory of quantized 1D spacetime can resolve the theory of mass by the combined theories of density and volume. This theory implies the existence of two kinds of mass: the potential and the kinetic. It can also clarify the concept of electroweak charges and color charges by invoking a principle of a directional invariance.

So a theory that can describe both mass and charge using the physically revised concepts of density and volume can be called an absolute TOE.

A rough formulation of this uncertainty between density and volume at time=0 is given by

$$3^{-9} gram \leq \Delta \rho^2 \Delta V^2 \leq 4^{-9} gram$$

25. Aug 1, 2004

### Antonio Lao

or

$$\left| \Delta \rho^2 \Delta V^2 \right| \leq \frac{1}{\pi^9}$$


text:
#### Authors

Kirthevasan Kandasamy, Maruan Al-Shedivat, Eric P. Xing

#### Abstract

Recently, there has been a surge of interest in using spectral methods for estimating latent variable models. However, it is usually assumed that the distribution of the observations conditioned on the latent variables is either discrete or belongs to a parametric family. In this paper, we study the estimation of an $m$-state hidden Markov model (HMM) with only smoothness assumptions, such as H\"olderian conditions, on the emission densities. By leveraging some recent advances in continuous linear algebra and numerical analysis, we develop a computationally efficient spectral algorithm for learning nonparametric HMMs. Our technique is based on computing an SVD on nonparametric estimates of density functions by viewing them as \emph{continuous matrices}. We derive sample complexity bounds via concentration results for nonparametric density estimation and novel perturbation theory results for continuous matrices. We implement our method using Chebyshev polynomial approximations. Our method is competitive with other baselines on synthetic and real problems and is also very computationally efficient.


text:
Search by Topic

Resources tagged with Generalising similar to Squaring the Circle and Circling the Square:

Filter by: Content type:
Stage:
Challenge level:

There are 125 results

Broad Topics > Using, Applying and Reasoning about Mathematics > Generalising

Squaring the Circle and Circling the Square

Stage: 4 Challenge Level:

If you continue the pattern, can you predict what each of the following areas will be? Try to explain your prediction.

Polycircles

Stage: 4 Challenge Level:

Show that for any triangle it is always possible to construct 3 touching circles with centres at the vertices. Is it possible to construct touching circles centred at the vertices of any polygon?

A Tilted Square

Stage: 4 Challenge Level:

The opposite vertices of a square have coordinates (a,b) and (c,d). What are the coordinates of the other vertices?

Equilateral Areas

Stage: 4 Challenge Level:

ABC and DEF are equilateral triangles of side 3 and 4 respectively. Construct an equilateral triangle whose area is the sum of the area of ABC and DEF.

Semi-square

Stage: 4 Challenge Level:

What is the ratio of the area of a square inscribed in a semicircle to the area of the square inscribed in the entire circle?

Tilted Squares

Stage: 3 Challenge Level:

It's easy to work out the areas of most squares that we meet, but what if they were tilted?

Shear Magic

Stage: 3 Challenge Level:

What are the areas of these triangles? What do you notice? Can you generalise to other "families" of triangles?

Jam

Stage: 4 Challenge Level:

A game for 2 players

Nim-interactive

Stage: 3 and 4 Challenge Level:

Start with any number of counters in any number of piles. 2 players take it in turns to remove any number of counters from a single pile. The winner is the player to take the last counter.

Loopy

Stage: 4 Challenge Level:

Investigate sequences given by $a_n = \frac{1+a_{n-1}}{a_{n-2}}$ for different choices of the first two terms. Make a conjecture about the behaviour of these sequences. Can you prove your conjecture?

Lower Bound

Stage: 3 Challenge Level:

What would you get if you continued this sequence of fraction sums? 1/2 + 2/1 = 2/3 + 3/2 = 3/4 + 4/3 =

Picturing Square Numbers

Stage: 3 Challenge Level:

Square numbers can be represented as the sum of consecutive odd numbers. What is the sum of 1 + 3 + ..... + 149 + 151 + 153?

Thank Your Lucky Stars

Stage: 4 Challenge Level:

A counter is placed in the bottom right hand corner of a grid. You toss a coin and move the star according to the following rules: ... What is the probability that you end up in the top left-hand. . . .

Sliding Puzzle

Stage: 1, 2, 3 and 4 Challenge Level:

The aim of the game is to slide the green square from the top right hand corner to the bottom left hand corner in the least number of moves.

One, Three, Five, Seven

Stage: 3 and 4 Challenge Level:

A game for 2 players. Set out 16 counters in rows of 1,3,5 and 7. Players take turns to remove any number of counters from a row. The player left with the last counter looses.

Multiplication Arithmagons

Stage: 4 Challenge Level:

Can you find the values at the vertices when you know the values on the edges of these multiplication arithmagons?

Winning Lines

Stage: 2, 3 and 4

An article for teachers and pupils that encourages you to look at the mathematical properties of similar games.

Attractive Tablecloths

Stage: 4 Challenge Level:

Charlie likes tablecloths that use as many colours as possible, but insists that his tablecloths have some symmetry. Can you work out how many colours he needs for different tablecloth designs?

Pareq Calc

Stage: 4 Challenge Level:

Triangle ABC is an equilateral triangle with three parallel lines going through the vertices. Calculate the length of the sides of the triangle if the perpendicular distances between the parallel. . . .

Chess

Stage: 3 Challenge Level:

What would be the smallest number of moves needed to move a Knight from a chess set from one corner to the opposite corner of a 99 by 99 square board?

Jam

Stage: 4 Challenge Level:

To avoid losing think of another very well known game where the patterns of play are similar.

Intersecting Circles

Stage: 3 Challenge Level:

Three circles have a maximum of six intersections with each other. What is the maximum number of intersections that a hundred circles could have?

Pentanim

Stage: 2, 3 and 4 Challenge Level:

A game for 2 players with similaritlies to NIM. Place one counter on each spot on the games board. Players take it is turns to remove 1 or 2 adjacent counters. The winner picks up the last counter.

Go Forth and Generalise

Stage: 3

Spotting patterns can be an important first step - explaining why it is appropriate to generalise is the next step, and often the most interesting and important.

Tourism

Stage: 3 Challenge Level:

If you can copy a network without lifting your pen off the paper and without drawing any line twice, then it is traversable. Decide which of these diagrams are traversable.

Special Sums and Products

Stage: 3 Challenge Level:

Find some examples of pairs of numbers such that their sum is a factor of their product. eg. 4 + 12 = 16 and 4 × 12 = 48 and 16 is a factor of 48.

Enclosing Squares

Stage: 3 Challenge Level:

Can you find sets of sloping lines that enclose a square?

Stage: 3 Challenge Level:

List any 3 numbers. It is always possible to find a subset of adjacent numbers that add up to a multiple of 3. Can you explain why and prove it?

Hidden Squares

Stage: 3 Challenge Level:

Rectangles are considered different if they vary in size or have different locations. How many different rectangles can be drawn on a chessboard?

Converging Means

Stage: 3 Challenge Level:

Take any two positive numbers. Calculate the arithmetic and geometric means. Repeat the calculations to generate a sequence of arithmetic means and geometric means. Make a note of what happens to the. . . .

Mini-max

Stage: 3 Challenge Level:

Consider all two digit numbers (10, 11, . . . ,99). In writing down all these numbers, which digits occur least often, and which occur most often ? What about three digit numbers, four digit numbers. . . .

Picturing Triangle Numbers

Stage: 3 Challenge Level:

Triangle numbers can be represented by a triangular array of squares. What do you notice about the sum of identical triangle numbers?

Games Related to Nim

Stage: 1, 2, 3 and 4

This article for teachers describes several games, found on the site, all of which have a related structure that can be used to develop the skills of strategic planning.

Sum Equals Product

Stage: 3 Challenge Level:

The sum of the numbers 4 and 1 [1/3] is the same as the product of 4 and 1 [1/3]; that is to say 4 + 1 [1/3] = 4 × 1 [1/3]. What other numbers have the sum equal to the product and can this be so for. . . .

Painted Cube

Stage: 3 Challenge Level:

Imagine a large cube made from small red cubes being dropped into a pot of yellow paint. How many of the small cubes will have yellow paint on their faces?

Nim

Stage: 4 Challenge Level:

Start with any number of counters in any number of piles. 2 players take it in turns to remove any number of counters from a single pile. The loser is the player who takes the last counter.

Mystic Rose

Stage: 3 Challenge Level:

Use the animation to help you work out how many lines are needed to draw mystic roses of different sizes.

Egyptian Fractions

Stage: 3 Challenge Level:

The Egyptians expressed all fractions as the sum of different unit fractions. Here is a chance to explore how they could have written different fractions.

Cuboid Challenge

Stage: 3 Challenge Level:

What size square corners should be cut from a square piece of paper to make a box with the largest possible volume?

Masterclass Ideas: Generalising

Stage: 2 and 3 Challenge Level:

A package contains a set of resources designed to develop pupils’ mathematical thinking. This package places a particular emphasis on “generalising” and is designed to meet the. . . .

Handshakes

Stage: 3 Challenge Level:

Can you find an efficient method to work out how many handshakes there would be if hundreds of people met?

Plus Minus

Stage: 4 Challenge Level:

Can you explain the surprising results Jo found when she calculated the difference between square numbers?

Steps to the Podium

Stage: 2 and 3 Challenge Level:

It starts quite simple but great opportunities for number discoveries and patterns!

Magic Letters

Stage: 3 Challenge Level:

Charlie has made a Magic V. Can you use his example to make some more? And how about Magic Ls, Ns and Ws?

Generating Triples

Stage: 4 Challenge Level:

Sets of integers like 3, 4, 5 are called Pythagorean Triples, because they could be the lengths of the sides of a right-angled triangle. Can you find any more?

Christmas Chocolates

Stage: 3 Challenge Level:

How could Penny, Tom and Matthew work out how many chocolates there are in different sized boxes?

For Richer for Poorer

Stage: 3 Challenge Level:

Charlie has moved between countries and the average income of both has increased. How can this be so?

Partitioning Revisited

Stage: 3 Challenge Level:

We can show that (x + 1)² = x² + 2x + 1 by considering the area of an (x + 1) by (x + 1) square. Show in a similar way that (x + 2)² = x² + 4x + 4

Seven Squares - Group-worthy Task

Stage: 3 Challenge Level:

Choose a couple of the sequences. Try to picture how to make the next, and the next, and the next... Can you describe your reasoning?

Nim-like Games

Stage: 2, 3 and 4 Challenge Level:

A collection of games on the NIM theme


text:
# lim calculus problem with infinity

$$\lim_{n→∞} \left( \left(\frac{n+3}{n+5}\right)^{n+4} + \sqrt[2n]{3n}\right)$$

I tried replacing n+5 with u and simplifying but the answer seems off. Help would be greatly appreciated.

-
What is +∧2n√3n supposed to mean? –  some1.new4u Sep 20 '13 at 21:05
@some1.newfu I’m pretty sure, it is meant to be $\sqrt[2n]{3n}$. –  k.stm Sep 20 '13 at 21:22
formatting is correct now, thank you. –  vilbur Sep 20 '13 at 21:28

We need to do some rewriting:

\begin{align} \left(\frac{n+3}{n+5}\right)^{n+4} &= \left(\frac{n+5-2}{n+5}\right)^{n+4} \\ &= \left(1-\frac{2}{n+5}\right)^{n+5-1} \\ &= \underbrace{ \left(1-\frac{2}{n+5}\right)^{n+5} }_{\to e^{-2}}\ \underbrace{ \left(1-\frac{2} {n+5}\right)^{-1} }_{\to 1} \end{align}

So the left term goes to $e^{-2}$. The right side can be written as $(\sqrt[n]{3n})^{\frac12}$. The $n$-th root of any polynomial in $n$ goes to $1$, so this goes to $1$. The overall limit is $e^{-2}-1$.

-
How do you get 1 inside the brackets on the second line? –  vilbur Sep 21 '13 at 7:28
@vilbur: $\frac{n+5-2}{n+5} = \frac{(n+5)-2}{n+5} = \frac{n+5}{n+5} - \frac{2}{n+5} = 1-\frac2{n+5}$. –  Javier Badia Sep 21 '13 at 13:16

Hint: $$\left(\frac{n+3}{n+5}\right)^{n+4} + \sqrt[2n]{3n} = \left(\left(1-\frac{2}{n+5}\right)^{-\frac{n+5}{2}}\right)^{-\frac{2(n+4)}{n+5}} + 3^{1/2n}(\sqrt[n]{n})^{1/2}.$$

-

The inner fraction simplifies to 1, so 1 to infinity is 1. 1 + infinity = infinity.

(then again it is quite difficult to understand from the formatting)

P.S. After replacing u = n+5, you get $\frac{u - 2}{u}$, which isn't off.

-
The inner fraction does not simplify as $1$, and the right-most term does not tend to infinity. So this isn't correct. –  user61527 Sep 21 '13 at 5:06
@T.Bongers the limit of a rational with the numerator and denominator same degree is the constant, which in this case happens to be $\frac{n}{n} = 1$. –  Don Larynx Sep 21 '13 at 12:49
The fraction goes to $1$ but the exponent goes to $\infty$; this doesn't go to $1$ but rather is an indeterminate case, as evidenced by the well known fact that $(1+\frac1{n})^n \to e$. –  Javier Badia Sep 21 '13 at 13:14
Also, the nth-root of n goes to $1$. If you don't believe me, take the logarithm of the expression. –  Javier Badia Sep 21 '13 at 13:15
I understand my errors –  Don Larynx Sep 21 '13 at 13:18


text:
## Blocks: Rate a course

block_rate_course
Maintained by Jenny Gray
This block provides an Amazon-style 5 star rating system for courses. Users each give a rating and the total is displayed in the block.
Moodle 2.0, 2.1, 2.2

### Sets

This plugin is part of set Open University.

This block provides an Amazon-style 5 star rating system for courses. Users each give a rating and the total is displayed in the block.  Optionally administrators can connect to Questionnaire module instances on the same course from the block, to add a "Review" survey.

### Contributors

• Sun, Jun 17, 2012, 10:55 AM
Hello, I have the same question as Gawesh Jawaheer that is, could this rate it block be used with any activity on moodle? Thank you
• Wed, Sep 26, 2012, 6:30 PM
New version released today which you can add to the site home page with a warning message in edit mode.
• Fri, Sep 28, 2012, 2:20 AM
Hi Jenny,

It is a nice block.
For non-english users it is almost as nice, but in spite of a full local translation (language customization), the block displays a "no ratings given" (graphic?) message in english when (obviously) no ratings have been given, and this particular sentence is not available for translation within the strings language pack.

Would you be so kind as to check this and make the necessary improvement ?

German Valero (mex spanish language pack maintainer)
• Fri, Sep 28, 2012, 3:55 PM
Hi German, yes that's come up before. I must remember to change it next time I'm in there. The best workaround is for people to change the graphic in their theme.
• Sun, Apr 14, 2013, 12:54 AM
hi
i need to add voting or poll in my frontpage moodle 2.4 which occure like as in websit voting
• Thu, Jun 13, 2013, 7:23 AM
Hi Jenny,
The AMOS translator (https://moodle.org/) has Hebrew and Mexican Spanish languages translated strings for this add-on, but there are no German language strings there (as mentioned in http://docs.moodle.org/25/en/Course_rate_block#Languages ). The german language strings are in the 'lang/de' folder within the plugin downloadable ZIP files.

I took the german language strings from the 'de' folder from the downloaded file and submitted them to the german pack maintainer at AMOS.

That (old way) of placing language strings seems to be now obsolete. Please see http://lang.moodle.org/mod/forum/discuss.php?d=2485

• Thu, Jun 13, 2013, 3:55 PM
Thanks for reminding me! I've made a tracker issue CONTRIB-4415 and will do this next time we release an update to the block.
• Sat, Aug 17, 2013, 4:07 AM
Does this work with Moodle 2.5? I installed but it is giving me an Internal Server Error when I click to rate the course.
• Tue, Oct 8, 2013, 11:39 AM
when will you make version for 2.5? because I want to install it on moodle 2.5.
• Fri, Dec 13, 2013, 3:49 PM
hello Jenny...thank a lot for this cool plugin..but it would be great if you can make it for Moodle 2.6 since i have just upgrade to Moodle 2.6...i really looking forward ya~! Thanks~!
• Fri, Dec 13, 2013, 4:54 PM
Has any-one tried it in 2.6 yet? We've only just gone up to 2.5 so it will be 3-6 months before I need a 2.6 version myself. I'm not aware of any significant changes that would cause it to break? Please give it a try and report any issues in the Tracker.
• Tue, Jan 7, 2014, 6:21 AM
Hi all, is it possible to show only the rating result in any course list, like in the front page even if you'r not logged in?
• Tue, Jan 7, 2014, 5:14 PM
Hi Pedro, please see the advanced options section of the documentation http://docs.moodle.org/26/en/Course_rate_block#Advanced_Options - you will need to be a programmer to do this as you'll be altering areas of Moodle not within the plug-in's control.
• Tue, Feb 11, 2014, 1:22 PM
Hi,
I want to add extera field 'Comment'. For this I added new field comment in mdl_block_rate_course table which have degault value '0'. also i have written the following code on rate.php page
echo '';
and on update.php i have added
$comment = required_param('comment',PARAM_ALPHA); on the top and$completion->comment = \$comment;
just above where data is inserting.

But after submitting, the comment value is not reflecting . It is showing '0' as i have defiled.

Kindly let me knwo what i am doing wrong.

Regards
Ajeet
• Tue, Mar 4, 2014, 12:31 PM
How to Each session will be linked to general rating system and also Each session will be linked to a (general comments)Memo field for feedback.


text:
# Proving number of calls made in cut-rod algorithm [duplicate]

I was reading dynamic programming chapter from famous book Introduction To Algorithm

In rod cutting problem it gives simple algorithm as follows:

    cutRod(p,n)
{
if (n == 0)
{
return 0
}
q = -∞
for (i=1 to n)
{
q = max(q,p[i]+cutRod(p,n-i))
}
return q
}

It then says:

T(n) be the total number of calls made to cutRod() when called with its second parameter equal to n. T(n) equals the number of nodes in a subtree whose root is labeled n in the recursion tree. The count includes the initial call at its root. Thus,

T(0) = 1 and

T(n) = ${\sum\limits_{j=0}^{n-1} T(j)}$

Exercise at the end of this chapters asks to prove from above two that in fact

T(n) = 2$^n$

How can we go about proving this?

## marked as duplicate by FrankW, Rick Decker, David Richerby, D.W.♦, Wandering LogicSep 6 '14 at 3:52

• Just prove it by induction on $n$, since you're given the closed form for $T(n)$. – David Richerby Sep 4 '14 at 16:38
• Please don't just copy a exercise problem here and ask us to solve it for you. We expect you to make a serious effort before asking, and to show us what you've tried in the question, and to articulate a specific question about your attempt. – D.W. Sep 5 '14 at 5:56
• You can see that it is 2^n by simply starting to expand it for n = 0, 1, 2 and 3 – Nils Jun 8 '18 at 9:18

Hence T(k+1) = T(k) + sum(Ti) {i = 0 to k-1}


text:
Refer from Reinforcement Learning An Introduction (2nd) and Reinforcement Learning specialization on Coursera by University of Alberta & Alberta Machine Intelligence Institute

## Policies and Value Functions

### Policy

Formally, a policy is a mapping from states to probabilities of selecting each possible action.

• deterministic policy, denote $\pi(s)=a$: one state correspond to one action
• stochastic policy, $\pi(a|s)$: a probability distribution over all visable actions

It's important that policies depend only on the current state, not on other things like time or previous states.

### State-value Function

Almost all reinforcement learning algorithms involve estimating value functions -- functions of states (or of state–action pairs) that estimate how good it is for the agent to be in a given state (or how good it is to perform a given action in a given state), which means value function predicts reward into future.

The value function of a state $s$ under a policy $\pi$, denoted $v_\pi(s)$, is the expected return when starting in $s$ and following $\pi$ thereafter. For MDPs, we can define $v_\pi$ formally by

$v_\pi(s)\doteq \mathbb{E}_\pi[G_t|S_t=s]=\mathbb{E}_\pi[\sum_{k=0}^\infty \gamma^kR_{t+k+1}|S_t=s],\ for\ all\ s\in \mathbf{S}$

We call the function $v_\pi$ the state-value function for policy $\pi$

### Action-value Function

Similarly, we define the value of taking action $a$ in state $s$ under a policy $\pi$, denoted $q_\pi(s,a)$, as the expected return starting from $s$, taking the action $a$, and thereafter following policy $\pi$:

$q_\pi(s,a)\doteq \mathbb{E}_\pi[G_t|S_t=s,A_t=a]=\mathbb{E}_\pi[\sum_{k=0}^\infty \gamma^kR_{t+k+1}|S_t=s,A_t=a]$

We call the function $q_\pi$ the **action-value function for policy *,

## Bellman Equations

### Transform Between $v_\pi$ And $q_\pi$

Through the given diagram, we can derivate an equation for $v_\pi$ in terms of $q_\pi$ and $\pi$.

$\begin{eqnarray*} v_\pi(s) &=&\mathbb{E}_\pi[G_t|S_t=s]\\ &=&\sum_a\pi(a|s)\mathbb{E}[G_t|S_t=s,A_t=a]\\ &=&\sum_a\pi(a|s)q(s,a)\tag{3.1} \end{eqnarray*}$ Recall that $G_t=R_{t+1}+\gamma G_{t+1}$. With given diagram below, we can derivate an equation for $q_\pi$ in terms of $v_\pi$ and $p(s',r|s,a)$. (use markov property to simplify original equation)

$\begin{eqnarray*} q_\pi(s,a) &=&\mathbb{E}_\pi[G_t|S_t=s,A_t=a]\\ &=&\mathbb{E}_\pi[R_{t+1}+\gamma G_{t+1}]\\ &=&\sum_{s',r}p(s',r|s,a)(r+\gamma \mathbb{E}_\pi[G_{t+1}|S_{t+1}=s'])\\ &=&\sum_{s',r}p(s',r|s,a)(r+\gamma v_\pi(s'))\tag{3.2} \end{eqnarray*}$

### Bellman Equations for $v_\pi$

Bellamn equation allows us to relate the value of the current state to the value of future states without waiting to observe all the future rewards.
With $(3.1),(3.2)$, we can easiy get bellamn equation for $v_\pi$

$\begin{eqnarray*} v_\pi(s) &=&\sum_a\pi(a|s)q(s,a)\\ &=&\sum_a\pi(a|s)\sum_{s',r}p(s',r|s,a)(r+\gamma v_\pi(s'))\tag{3.3} \end{eqnarray*}$

$s'$ here stands for next state. Bellamn equation expresses a relationship between the value of a state and the values of its successor states (next state). You can get a more intiutive understanding about how this equation forms though its backup diagram below: we first choose actions through policy and then transites to a successor state with corresponding reward under environment dynamics. The open circles represent state nodes and solid circles represent action nodes.

### Bellman Equations For $q_\pi$

With $(3.1),(3.2)$, we can easiy get bellamn equation for $q_\pi$

$\begin{eqnarray*} q_\pi(s,a) &=&\sum_{s',r}p(s',r|s,a)(r+\gamma v_\pi(s'))\\ &=&\sum_{s',r}p(s',r|s,a)(r+\gamma\sum_{a'} q_\pi(s',a'))\tag{3.4} \end{eqnarray*}$

$a'$ here stands for actions under possible state $s'$. Similarly, this equation express a relationship betweeen the value of an action and the values of actions under possible successor state $s'$

### An Example of Value Function: Grideworld

• State: each grid (totally 25 states)
• Action: north, south, east, and west
• Reward: actions that would take the agent off the grid leave its location unchanged, but also result in a reward of -1. Other actions results in a reward 0. Every time the agent moves any directions at position A would be transited to A' with reward +10. This is the same to B and B' except for reward +5.
• Policy: random policy, each direction has equal probability, 25%.

$\gamma=0.9$

Now, just for curious, we can verify the $v_\pi(s)$ bellman equation in this example. Let's say we choose center state.

$(0.7\times0.9+0)\times0.25+(2.3\times0.9+0)\times0.25+(0.4\times0.9+0)\times0.25\\+(-0.4\times0.9+0)\times0.25=0.69\approx0.7$

### Why Bellman Equations?

We use bellman equations to calculate $v_\pi(s)$ for all $s\in \mathbf{S}$ by solving the system of linear equations.

Still the previous example, gride world. It has 25 states and we get 25 unknown parameters. For each state we can get a bellman equation, therefore we get 25 equations. Through 25 equations, we sovle them to obtain 25 state values.

But bellman equation is not pragmatic for many reasons. One of them is that sometimes the number of states is too large and it's impossible to calculate results in a short time. It can only solve small MDPs.

## Optimality (Optimal Policies & Value Functions)

### Optimal Policy

A policy $\pi$ is defined to be better than or equal to a policy $\pi'$ if its expected return is greater than or equal to that of $\pi'$ for all states. In other words,

$\pi>\pi' \ \ iff\ v_\pi(s)\ge v_{\pi'}(s)\ for\ all\ s \in \mathbf{S}$

There is always at least one deterministic policy that is better than or equal to all other policies. This is an optimal policy. Although there may be more than one, we denote all the optimal policies by $\pi_*$. They share the same state-value function, called the optimal state-value function, denoted $v_*$, and the same optimal action-value function, denoted $q_*$

$v_*(s)\doteq \mathop{max}_\pi\ v_\pi(s)\\ q_*(s,a)\doteq \mathop{max}_\pi\ q_\pi(s,a)\\ for\ all\ s\in \mathbf{S},a\in \mathbf{A}$

### Optimal Value Functions

Because the optimal policy $\pi_*$ is a deterministic policy, the optimal action $a_*$ with $\pi(a_*|s)$ equals to 1 and all other actions' probability equal to 0. We can re-write $v_*$ with bellman equation as below, called bellman optimality equation for $v_*$.

$\begin{eqnarray*} v_*(s) &=&\mathop{max}_\pi\ v_\pi(s)\\ &=&\mathop{max}_a \mathbb{E}[R_{t+1}+\gamma v_*(S_{t+1})|S_t=s,A_t=a]\\ &=&\mathop{max}_a\ \sum_{s',r}p(s',r|s,a)(r+\gamma v_*(s'))\tag{3.5} \end{eqnarray*}$

Similarly, bellman optimality equation for $q_*$ is

$\begin{eqnarray*} q_*(s,a) &=&\mathop{max}_\pi\ q_\pi(s,a)\\ &=&\mathbb{E}[R_{t+1}+\gamma \mathop{max}_{a'}\ q_*(S_{t+1},a')|S_t=s,A_t=a]\\ &=&\sum_{s',r}p(s',r|s,a)(r+\gamma \mathop{max}_{a'}\ q_*(s',a'))\tag{3.6} \end{eqnarray*}$

The bellman optimality equations relate the value of a state or state-action pair, to it's possible successors under any optimal policy.

Unfortunately, the $max$ funtion here is not linear, we cannot through linear system solver to directly solve bellman optimality equation to obtain all $v_*$ in MDPs. Although, in principle, one can use a variety of methods for solving systems of nonlinear equations, it is not recommended due to its extreme computational cost.

### Get Optimal Policy

Once one has $v_*$, it is relatively easy to determine an optimal policy. Because, for each state $s$, there will be one or more actions at which the maximum is obtained in the Bellman optimality equation. That is to say any policy that is greedy with respect to the optimal evaluation function $v_*$ is an optimal policy.

Having $q_*$ makes choosing optimal actions even easier. The action-value function effectively caches the results of all one-step-ahead searches.