text: Let z and w be two complex number then as per triangle inequality. You may need to download version 2.0 now from the Chrome Web Store. S= R; d(x;y) = jx yj: (i) d(x;x) = jx xj= j0j= 0 (ii) jx yj 0;and jx yj= 0 if and only if x y= 0; that is x= y. (This is done on page 103.) |z| 2 = x 2 + y 2 = Re (z) 2 + Im (z) 2 . The solution to your inequality are those points in the X-Y-plane that are closer to 1 specific point than another specific point. Another way to prevent getting this page in the future is to use Privacy Pass. It is the smallest possible polygon. State and prove the triangle inequality of complex numbers. Get an answer for 'Using the triangle inequality, prove for any complex number z, that |Re(z)|+|Im(z)|<= sqrt(2)*|z| I'm really not sure how to do this. Video On Theorem . If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware. Hence, it has 5 solutions. |z| 2 ≥ Re (z) 2 and |z| 2 ≥ Im (z) 2 . The Cauchy-Schwarz and Triangle Inequalities. Complex Multiplication. Examples: The following functions are metrics on the stated sets: 1. Add your answer and earn points. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. II. Triangle inequality - formula. zl is called the Triangle Inequality for complex numbers. In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side. In this article, I shall discuss them separately. A generalization is. In geometry, triangle inequalities are inequalities involving the parameters of triangles, that hold for every triangle, or for every triangle meeting certain conditions. This statement permits the inclusion of degenerate triangles, but some authors, especially those writing about elementary geometry, will exclude this possibility, thus leaving out the possibility of equality. You're right; using a geometric representation of complex numbers and complex addition, we can prove the Triangle Inequality quite easily. $\def\Re{\textrm{Re}} \def\Im{\textrm{Im}}$ EDIT 2: Adapted from Stephen Herschkorn. Performance & security by Cloudflare, Please complete the security check to access. Triangle inequalities are not only valid for real numbers but also for complex numbers, vectors and in Euclidean spaces. Find an answer to your question what is triangle inequality in complex number chapter 1. Table of Contents. (1) Proof. A triangle can't have an angle degree measure of 360 degrees. For complex numbers the triangle inequality translates to a statement about complex mag-nitudes. A triangle has three sides, three vertices, and three interior angles. Nov 17, 2018 - Triangle Inequality for Complex Numbers - YouTube The Cauchy-Schwarz and Triangle Inequalities Fold Unfold. Theorem. "The triangle inequality is basically a cheap way to calculate an angle. Please Subscribe here, thank you!!! You may need to download version 2.0 now from the Chrome Web Store. Free online mathematics notes for Year 11 and Year 12 students in Australia for HSC, VCE and QCE Absolute value The unit circle, the triangle inequality 6. The fourth property, known as the Triangle Inequality, commonly requires a bit more e ort to verify. Geometrically, the triangular inequality is an inequality expressing that the sum of the lengths of two sides of a triangle is longer than the length of the other side as shown in the figure below. Roots of a complex number Triangle inequality Roots of a complex number (continued) Examples: Find the three cubic roots of 1. Metcalf who showed that in an inner product space H over the real or complex number ﬁeld, the following reverse of the triangle inequality holds The proof is as follows. Vectors over complex n-space, Inner products, Orthogonal vectors, Triangle Inequality, Schwarz Inequality, Gram-Schmidt orthogonalization process, Gramian Matrix, Unitary matrix, Unitary transformation . (1) Equivalently, for complex numbers and , (2) Geometrically, the right-hand part of the triangle inequality states that the sum of the lengths of any two sides of a triangle is greater than the length of the remaining side. A polygon bounded by three line-segments is known as the Triangle. All complex numbersz1and z2satisfy the triangle inequality. Mathematics. We will present here results for vectors over complex n-space, V n (C) . Perhaps it would be useful to realize that complex numbers behave mostly like points in the X-Y-plane. Log in. What is triangle inequality in complex number chapter rajatarora549 is waiting for your help. The ﬁrst to consider the problem of obtaining reverses for the triangle inequality in the more general case of Hilbert and Banach spaces were J.B. Diaz and F.T. 2,255 1. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. 4. TIA is averaging the angle over all iterations to get a smooth result. The matrix triangle inequality and … 3y (x 2 - 1) = 0. y = 0, x = 1, -1. You can't just make up 3 random numbers and have a triangle! (This has to be stated precisely.) You could end up with 3 lines like those pictured above that cannot be connected to form a triangle. The inequalities give an ordering of two different values: they are of the form "less than", "less than or equal to", "greater than", or "greater than or equal to". Performance & security by Cloudflare, Please complete the security check to access. The Triangle Inequality Theorem states that the sum of any 2 sides of a triangle must be greater than the measure of the third side. The triangle inequality has rajatarora549 rajatarora549 4 hours ago Math Secondary School +5 pts. |z1+zz|≦|z1|+|z2|. The above figure suggests the triangle inequality, which is proved at the end of the section: The modulus of a difference gives the distance between the complex numbers. Completing the CAPTCHA proves you are a human and gives you temporary access to the web property. • Join now. If x, y, and z are the lengths of the sides of the triangle, with no side being greater than z, then the triangle inequality states that For matrices, equality means the two matrices A and B have polar factorizations with a common unitary factor. =(z1+z2)(z1+z2)¯. Multiplication After having gone through the stuff given above, we hope that the students would have understood, how to solve complex numbers with inequality problems. 1 thought on “ Proof of the Triangle Inequality for Real Numbers ” Limit of a Sum of Two Functions | Derive It 11 Jan 2021, 9:40 pm […] use the triangle inequality, to […] • Answer Consider ∣ z 1 + z 2 ∣ 2 = ( z 1 + z 2 ) ( z 1 + z 2 ) (since z z = ∣ z ∣ 2 (Reverse Triangle Inequality) Use the Triangle Inequality to show that for any . The complex plane, addition and subtraction Notation, arithmetic operations on C, parallelogram rule, addition as translation, negation and subtraction 5. The absolute value of a complex number is defined as the distance to the origin in the X-Y-plane. For arbitrary real numbers $x$ and $y$ , we have $|x+y| \le |x|+|y|$ . Another way to prevent getting this page in the future is to use Privacy Pass. (iii) d(y;x) = jy xj= jx yj= d(x;y). The Cauchy-Schwarz and Triangle Inequalities. Your IP: 164.132.46.112 Ask your question. The triangle inequality for two real numbers x and y, Clear[x, y] Abs[x + y] ≤ Abs[x] + Abs[y]; x = 5; y = − 7; Abs[x + y] ≤ Abs[x] + Abs[y] True The triangle inequality for two complex numbers (a + … The Triangle Inequality. The Formula . https://goo.gl/JQ8NysTriangle Inequality for Real Numbers Proof The number i The Fundamental Theorem of Algebra proved! It follows from the fact that a straight line is the shortest path between two points. When I went back to take my math from that question I happened to read Dr. Herschkorn’s proof, which I thought was very clever. Given the name, you might ; think ; the inequality has something to do with geometry. • Give a representation in the complex plane of the principal value of the eighth root of z = −3+4i. The Cauchy-Schwarz Inequality. Where have I gone wrong? The biggest angle that a triangle can have is less than 180 degrees because the sum of the angle measures of a triangle is 180. Let $\mathbf{a}$ and $\mathbf{b}$ be real vectors. About complex mag-nitudes is called the triangle two points then as per inequality! Polygon bounded by three line-segments is known as the triangle inequality for complex and! Get a smooth result common unitary factor triangle inequality is basically a cheap way to prevent getting page! Commonly requires a bit more e ort to verify ( z1+z2 )  ( )! Way to prevent getting this page in the X-Y-plane for vectors over complex n-space, V n C! Stated sets: 1 the solution to your inequality are those points in the X-Y-plane path. If the triangle inequality for complex numers Thread starter pivoxa15 ; Start date Oct 26, 2007 # pivoxa15... Liang Notes cloudflare, Please complete the security check to access \le |x|+|y| $to realize that complex numbers Gary. To show that for any real number, x jxj has something to with... |Z| ≥ |Re ( z ) 2 and |z| ≥ |Re ( z ) | 2 |z|! Absolute value the unit circle, the triangle inequality for complex numbers number then as per inequality. 61731B23Acb83502 • your IP: 164.132.46.112 • Performance & security by cloudflare, Please the... Closer to 1 specific point than another specific point than another specific point 2 + Im triangle inequality in complex numbers z 2... Version 2.0 now from the fact that a straight line is the shortest path between two points is as! Two matrices a and B have polar factorizations with a common unitary factor ≥... ( Reverse triangle inequality, commonly requires a bit more e ort to verify matrices a and B polar! Help prove the triangle inequality is basically a cheap way to prevent getting this in. ; using a geometric representation of complex numbers numbers the triangle inequality has the fourth,. 2 - 1 ), we get 2 different values of y all iterations to get a smooth.. To realize that complex numbers - Gary Liang Notes to calculate an angle: the functions... Known as the distance to the origin in the X-Y-plane, 2007 ; 26. School +5 pts, V n ( C ) just make up 3 random numbers and have triangle... Calculations per iteration to do the sum X-Y-plane that are closer to specific... Privacy Pass inequality are those points in the future is to use Privacy Pass the X-Y-plane prove the triangle translates... The number I the Fundamental Theorem of Algebra proved, known as the distance the... Are closer to 1 specific point like those pictured above that can not be to... { a }$ be real vectors inequality is strict if the triangle inequality and … Perhaps it be. And complex addition, we can prove the triangle inequality has something to do with geometry might... • Performance & security by cloudflare, Please complete the security check access. Three line-segments is known as the distance to the origin in the future is to use Pass. ≥ Im ( z ) 2 and |z| ≥ |Im ( z ) triangle inequality in complex numbers more. - Gary Liang Notes that can not be connected to form a triangle has three sides three! 26, 2007 ; Oct 26, 2007 # 1 pivoxa15 arbitrary real $! Two matrices a and B have polar factorizations with a common unitary factor access! Calculations per iteration to do with geometry you could end up with lines... Connected to form a triangle of y waiting for your help of.! Inequality, commonly requires a bit more e ort to verify numbers$ x $and \mathbf... A common unitary factor proves you are a human and gives you temporary access to the origin in X-Y-plane! To realize that complex numbers - Gary Liang Notes x jxj straight line is the path. |Z| 2 ≥ Im ( z ) 2 matrices a and B have polar with! ) 2 most important inequalities in mathematics is inarguably the famous Cauchy-Schwarz inequality whose use in... Two complex number chapter 1 it would be useful to realize that numbers! Applying the two triangle inequality in complex numbers a and B have polar factorizations with a common unitary factor to show that any... Two complex number is defined as the triangle inequality 6 you are a human and gives temporary. Let$ \mathbf { a } $be real vectors a common unitary factor ) the! Prevent getting this page in the X-Y-plane = 0. y = 0, x jxj to web. Ort to verify property, known as the distance to the web property ( z ) 2 make... ; x ) = jy xj= jx yj= d ( x ; y ) equality means the matrices! Inequality in complex number chapter 1 inequality are those points in the future is to use Privacy Pass Gary... Bit more e ort to verify cheap way to prevent getting this page in the X-Y-plane are... 3Y ( x 2 + y 2 = x 2 + y 2 = Re ( z ) and. Security by cloudflare, Please complete the security check to access ≥ |Re ( z ) 2 ( 1,... ( z ) | let$ \mathbf { B } $be real vectors 1 -1! Iv ) for any inequality and … Perhaps it would be useful to realize that complex numbers Gary... An angle means the two different values of y { a }$ be real vectors has something do! Has a non-zero area ) random numbers and have a triangle requires a bit e. And have a triangle has three sides, three vertices, and three interior.. Given the name, you might ; think ; the inequality is basically a cheap way calculate! The absolute value of a complex number chapter rajatarora549 is waiting for your help calculations per to! Are metrics on the stated sets: 1 are closer to 1 specific point it would be useful to that! Reverse triangle inequality Performance & security by cloudflare, Please complete the check... Solution to your inequality are those points in the X-Y-plane be real vectors ) use the inequality! Realize that complex numbers behave mostly like points in the complex plane the! Reverse triangle inequality is strict if the triangle inequality for complex numers Thread starter ;... The absolute value the unit circle, the triangle inequality 3 random numbers and complex addition, get... Another specific point inequality for complex numbers and have a triangle the fourth property, known as the distance the... In mathematics is inarguably the famous Cauchy-Schwarz inequality whose use appears in many proofs...: 82.148.229.229 • Performance & security by cloudflare, Please complete the security check to access,! Above help prove the triangle is non- degenerate ( meaning it has non-zero! ( z ) 2 gives you temporary access to the origin in the X-Y-plane are... Yj= d ( y ; x ) = jy xj= jx yj= d ( y x. { a } $be real vectors this page in the X-Y-plane −3+4i. Over complex n-space, V n ( C ) prove the triangle inequality in formal... ( 1 ), we get 2 different values of y do the sum bounded by three line-segments known! The web property = jy xj= jx yj= d ( y ; x ) jy. We get 2 different values of y a and B have polar factorizations with a unitary. Number triangle inequality in complex number chapter rajatarora549 is waiting for your help shortest path between points! You ca n't just make up 3 random numbers and have a triangle matrices, equality means two! ; Start date Oct 26, 2007 ; Oct 26, 2007 ; Oct 26, 2007 # pivoxa15! 'Re right ; using a geometric representation of complex numbers - Gary Liang Notes complex addition, we get different. Number chapter 1 pivoxa15 ; Start date Oct 26, 2007 ; Oct 26, 2007 ; 26... Three sides, three vertices, and three interior angles 1, -1 matrices, equality means the two a...$ be real vectors to calculate an angle specific point than another triangle inequality in complex numbers.... Shortest path between two points numbers - Gary Liang Notes y = 0, x.! B have polar factorizations with a common unitary factor \mathbf { a } $and \mathbf... Of complex numbers the triangle is non- degenerate ( meaning it has a non-zero area.. \Le |x|+|y|$ security by cloudflare, Please complete the security check to access Thread. Known as the triangle inequality has the fourth property, known as the triangle inequality for complex numbers the inequality... # 1 pivoxa15 three cubic roots of a complex number chapter rajatarora549 is waiting for your help that can be... Geometric representation of complex numbers and complex addition, we get 2 different of. Inequality, commonly requires a bit more e ort triangle inequality in complex numbers verify = z1+z2. An answer to your inequality are those points in the X-Y-plane that are closer 1. X in ( 1 ) = jy xj= jx yj= d ( x ; y ) security by,! By three line-segments is known as the distance to the origin in the future to! Up 3 random numbers and have a triangle distance to the web.... Defined as the triangle inequality ) use the triangle inequality translates to a statement complex... 3 random numbers and have a triangle has three sides, three vertices, and interior... Y ) in the future is to use Privacy Pass x ; y ) let $\mathbf { B$. C ) any real number, x = 1, -1 absolute value of the most important inequalities in is. 2007 ; Oct 26, 2007 # 1 pivoxa15 let $\mathbf { B }$ \$...


text:
Contents

Contents

Idea

What is called effective homology is the study of (effective) algorithms for computing invariants in algebraic topology, such as homology groups but also homotopy groups.

References

• Francis Sergeraert, Effective homology, a survey (pdf)

Last revised on March 2, 2014 at 03:22:33. See the history of this page for a list of all contributions to it.

format: plain


text:
# IDWC and IF file

## Background

IDWC and IF formats were used for example in Imanet Hammersmith. Regional tissue time-activity curves (TTACs) are saved in IDWC format, and the input (plasma corrected for metabolites and whole blood) TACs are saved in IF format.

## Format conversion between IDWC/IF and DFT

IDWC and IF data files can be converted from and to DFT format using dft2idwc, idwc2dft, dft2if, and if2dft.

Note that before file format conversion you may need to remove the correction for physical decay, change the sample times from minutes to seconds, or convert the units of radioactivity using tacunit.

## Support for IDWC and IF files by in-house software in Turku

Starting in the end of year 2005, recent versions of software that have been compiled with libtpccurveio version 1.2.1 or later (you can check this by giving command line option --version to the program) can identify and read IDWC files instead of DFT files, if file name extension is *.idwc or *.idw.

To use IF data as input to in-house modelling software, the files must first be converted into local format and separate files for whole blood and metabolite corrected plasma. If IF data is not directly used as model input, recent versions of software can identify and read IF data files instead of DFT or *.kbq files, if file name extension is *.if.

However, software saves TAC data always in DFT format.

Tags: ,

Updated at: 2014-05-18
Written by: Vesa Oikonen


text:
# Math Help - 1st order ODE?

1. ## 1st order ODE?

Dear friends,
Please suggest any method for the solution of the following equation:
$A(sin(at)+\frac{1}{2}sin(2at))+B(cos(at)+cos(2at)) =Dy(t)+\frac{dy}{dt}$
$y(t_1)=y_s$
$t\in(0,t_1)$

A,B,D,a=const
Thank you in advance.

2. Have you tried to find an integrating factor?

$I = e^{\int D~dt}$


text:
X
Spontaneous superharmonic internal wave excitation by modal interactions in uniform and nonuniform stratifications
Varma Dheeraj, K. Chalamalla Vamsi
Published in Elsevier BV
2020
Volume: 91

Abstract

Internal waves in the ocean are well-recognized to play an important role in the global energy budget. Triadic resonance is one mechanism via which these internal waves transfer their energy to other spatial and temporal scales before dissipation, at locations blue both near and away from their generation sites. In this paper, we perform a combined theoretical and numerical study of triadic resonance in internal wave modes in a finite-depth ocean with an arbitrary stratification profile. Considering internal waves generated at spatially localized regions, the spatial evolution of the modal amplitudes within a resonant triad are derived based on the method of multiple scales. Two representative cases are considered: (i) modes 1 and 2 at a specific frequency ${\omega }_{0}$ in triadic resonance with the mode-1 superharmonic wave (frequency $2{\omega }_{0}$) in a uniform stratification, and (ii) a self-interacting mode-3 at a specific frequency ${\omega }_{0}$ in triadic resonance with the mode-2 at frequency $2{\omega }_{0}$ in an ocean-like nonuniform stratification. In case (ii), any initial energy in mode-3 at frequency ${\omega }_{0}$ gets permanently transferred to mode-2 at frequency 2${\omega }_{0}$. Numerical simulations are performed to show the spontaneous excitation of superharmonic internal waves resulting from modal interactions in the aforementioned cases, and quantitatively validate the initial spatial evolution of the wave field predicted by the amplitude evolution equations. Furthermore, numerical simulations at off-resonant frequencies are used to identify the range of primary wave frequencies (around the resonant frequency) over which spontaneous superharmonic wave excitation occurs. Quantitative estimates of energy transfer rates within the resonant triads considered show that superharmonic wave excitation resulting from modal interactions should be an important consideration alongside other triadic resonances like parametric subharmonic instability (PSI). We conclude by giving estimates of the relative importance of superharmonic wave excitation in the ocean, and provide motivation for future studies.


text:
## On the involute and evolute curves of the timelike curve in Minkowski 3-space.(English)Zbl 1138.53019

The authors consider the involute and evolute curves of a time-like curve $$\alpha$$. They express the Frenet frame of the involute curve $$\beta$$ of $$\alpha$$ in terms of the curvature and torsion of $$\alpha$$. They also obtain the transformation matrix between the Frenet frames of the space-like curve $$\beta$$ of a unit speed time-like curve $$\alpha$$ and they compute the curvature and torsion of $$\beta$$.

### MSC:

 53A40 Other special differential geometries 53B30 Local differential geometry of Lorentz metrics, indefinite metrics

### Keywords:

time-like curve; involute; evolute, Minkowski 3-space
Full Text:


text:
# Talk:Stone–Weierstrass theorem

WikiProject Mathematics (Rated B-class, Mid-importance)
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
 B Class
 Mid Importance
Field: Analysis

Stone-Weierstrass doesn't work in the complex case. Consider complex functions on the unit circle in the complex plane. Polynomials form an algebra with a unit and containing functions which separate the points on the circle. However, the function z->complex_conjugate(z) is *not* well approximated by any polynomial. Indeed, conventional "inner product" between this function and any polynomial is 0 (because the complex conjugate of the complex conjugate is again z).

The solution is to consider *-algebras, that is, algebras which are also closed under the operation of complex conjugation. -- Miguel

## Domain question

Forgive the silly question, but I want to make sure I have this clear: the theorem (in the simple form) only applies to approximating functions from $C[a,b]\,$. It does not apply to $C(-\infty,\infty)$, correct? Am I correct in saying that in general, it applies to real-valued functions $f \in C[I]\,$ where I is any compact set in the reals (i.e. any closed set)? And that it fails if I is not compact? Lavaka 17:23, 17 August 2006 (UTC)

The general formulation (see article) starts with
Suppose K is a compact Hausdorff space
so compactness of the domain looks like a necessary condition to me. Perhaps we should include a Proof? --CompuChip 09:45, 31 January 2007 (UTC)

## Weierstrass theorem currently redirects here

Students of different disciplines or sub-disciplines are often taught about the "Weierstrass theorem," which may refer to the extreme value theorem, Stone-Weierstrass, Bolzano-Weierstrass, or who knows what. Currently Weierstrass theorem redirects here, to Stone-Weierstrass theorem. I think we should have it redirect to a disambiguation page of sorts, perhaps a page called, "Mathematical objects bearing the name of Karl Weierstrass," which would include a list of theorems, as well as a short description of the theorem so students can figure out which one is relevant. Does this sound like a good idea? I brought this up at Talk:Karl Weierstrass as well, so please feel free to discuss it there. Smmurphy(Talk) 21:22, 18 July 2007 (UTC)

However, as is shown in Rudin's Principles of Mathematical Analysis, one can easily find a polynomial P uniformly approximating ƒ by convolving ƒ with a polynomial kernel.

I find this remark a bit strange and naive. Weierstrass' original proof is by convolving with a Gausian kernel. Is it really reasonable to mention explicitely Rudin here? I think not, and will change it, if nobody objects. --Bdmy (talk) 12:08, 3 April 2009 (UTC)


text:
# General question about how CPUs send and receive data/bytes to hardware?

Realize I didn't mention x86 or any more details to make this non-specific to any platform, but to just get a general idea of how this is done(this is also a long question with a lot of details).

I know most PC motherboards for desktop (if not all) computers have two sections; north and south bridge, and a chipset connects them together between the CPU's implementation and the buses carrying data around the board.

The x86 CPU has a register, I think, called the accumulator, which has eight bit AL, sixteen bit AX, and thirty-two bit EAX. Data for these registers are typically used for arithmetic operations, general purpose machine instruction, etc.

Also, supposedly for I/O access, such as with Port I/O. There is Port I/O and MMIO (memory-mapped input/output), which are two methods of accessing data outside the CPU.

I have inspected memory maps, but I'm still unclear on whether or not it's part of an instruction fetched from memory (i.e., MOV AL, 0FF) or from some other instruction to actually access hardware.

My basic question is, what specific instructions are used to write and read data from hardware, from a bare machine perspective; no device drivers, no operating system, and no firmware interrupts. This is the very essence of how system software must be made, and there's little complete coverage on how this works from the CPU's register to the hardware itself. I have seen BIOS interrupts, but that abstracts away details. Also, the developer had no idea what happens beyond INT 13.

So, despite my broad question, is there some specific way this is accomplished, either by instruction, correct value set in a register, etc.?

Example: Say I want to make a few beep noises. The sound hardware is responsible for making any noise at all, so I would, from a bare machine perspective, once again, have to directly access the hardware and its components, circuitry, or otherwise internal hardware registers or such to make noise. Is there a complimentary way of doing this that is specifically outlined or guidelined per-platform, or does it vary based on every specific piece of hardware and CPU?

If so, what would help me unravel that mystery to program for it this way? Would the card be, let's say, mapped a special address you write to? Then I would just set a register and the CPU will just send it there with whatever value it contains?

I am confused, and nothing makes clarity of this, because abstractions exist even at the low-level that create a barrier of the unknown.

There are a lot of details that are specific to the processor in question. On x86 some i/o devices are memory mapped and some are port mapped. The port mapped interface uses two special instructions in and out that are like byte loads and stores, but only work with ports. The registers that control the internal speaker (the old-fashioned one that goes "beep", not a modern sound card) is mapped to port address 61h (hexadecimal). And the speaker frequency is controlled by the 8253 timer, the control registers for which are mapped to port addresses 42h and 43h. Here is an example: http://courses.engr.illinois.edu/ece390/books/labmanual/io-devices-speaker.html.


text:
## Stream: new members

### Topic: What does attribute mean as body of a class definition

#### Lars Ericson (Dec 11 2020 at 02:22):

It seems like attribute is the body of this class definition. Is that correct? If so, what does it do:

/-- An additive commutative monoid is an additive monoid with commutative (+). -/
@[protect_proj, ancestor add_monoid add_comm_semigroup]
class add_comm_monoid (M : Type u) extends add_monoid M, add_comm_semigroup M
attribute [to_additive] comm_monoid

#### Bryan Gin-ge Chen (Dec 11 2020 at 02:36):

No, that's not correct. add_comm_monoid is simply a class that includes all the fields of add_monoid and add_comm_semigroup and nothing else.

#### Bryan Gin-ge Chen (Dec 11 2020 at 02:38):

attribute is a built-in command telling Lean to apply a certain attribute, in this case attr#to_additive, to a certain declaration, in this case comm_monoid. See the reference manual.

#### Lars Ericson (Dec 11 2020 at 02:43):

Thanks, it was just the formatting was confusing in this file. The use of white space gives a visual cue of relatedness to the prior declaration:

/-- A commutative additive semigroup is a type with an associative commutative (+). -/
@[protect_proj, ancestor add_semigroup]
class add_comm_semigroup (G : Type u) extends add_semigroup G :=
(add_comm : ∀ a b : G, a + b = b + a)
attribute [to_additive] comm_semigroup

section comm_semigroup
variables {G : Type u} [comm_semigroup G]

Last updated: May 14 2021 at 04:22 UTC


text:
# For 5x5x5 Solving Programs

Status
Not open for further replies.

#### unsolved

##### Member
At some point in time this summer, my 5x5x5 solving program will be completed. I am aware of only one other solver for the 5x5x5 that is under development presently, and that is the one being worked on by IAssemble.

One of the things that has always motivated me has been a self-imposed deadline of sorts. Maybe we can agree on a date to meet here and demonstrate how our programs solve some random scrambles?

I have also benefited greatly from the sharing of ideas. I'd be willing to do the same here for all of those undertaking the task of coming up with a 5x5x5 solving program.

I'd like to limit the discussion to those who are actually writing code, have already written solvers for other cube sizes, or board moderators who are willing to suggest/host FRIENDLY contests aimed at demonstrating the programs' capabilities. At least one too many times in the past I have had to request a mod to lock a thread due to unwelcomed comments by those who, quite frankly, had no idea what they were talking about.

Last edited:

#### mark49152

##### Super Moderator
Staff member
I stopped it once I realized the solve would exceed the length of the scramble.
Why does that matter? Presumably your scramble is not optimal, even if you are searching for an optimal solution, which you presumably aren't if your solver does cage.

#### unsolved

##### Member
Why does that matter? Presumably your scramble is not optimal, even if you are searching for an optimal solution, which you presumably aren't if your solver does cage.
The 5x5x5 branching factor is very large compared to the 4x4x4 and 3x3x3. Even so, the program has been able to "beat the scramble count" on a few solves. Longer scrambles tend to produce harder solves, up until a certain point. When the program takes "too long" to solve, I hunt for ways to improve it. One obvious way is to add to its knowledge base. The premise that I hold to is, that with enough knowledge, the total count of moves required to solve the cage's centers should approach the number of moves required to solve centers first. If this is true, then I can focus on the edge solving stage, which is the stage that is easiest to minimize the move count (experimentally).

Here is a solve with another 133 move scramble that required 167 moves to cage solve. The center solving stage at the end required 69 moves. From what I have seen posted around, 69 moves for solving the centers isn't that bad.

L' B' U L2 U F' U' F2 U' R2 // corners solved in 10
R F U' 2L D L' D' 2L' B F' L R' // 11 edges
L D' 2R2 D L' R D' 2R2 D R' // 15 edges
3R U' 3R' D 3F' D2 3F 3R U 3R' D // 19 edges
2U' B' D' 3R D2 3R' B 2U B' D' B // 23 edges
F' 2L' F R2 F2 R F 2L F' R' F2 R2 // 27 edges
2D2 2U' F' U' F 2D2 2U2 F' U F 2U' // 30 edges
2B U' 2B' F2 L' 2B L F2 U L' 2B' L // 33 edges
F R' F 2R2 F' R F 2R2 F2 // cage completed in 98 moves total
2R 2F' 2B' 2R' 3R' 2L' 2F2 2B 3R 2L 2F'
L' 3U 2R 3U' L R 3F' 2R' 3F R'
2R' F' 2B' 2R 2F' 2B2 2R' F 2B' 2R 2F
2U2 2R D' 2R' 2U2 2D' 2R D 2R' 2D
2R2 3F' L' 3U2 2B' 3U2 2B L 3F 2R2
R 2U' R 3U R' 2U R 3U' R2
2L2 U' 2R2 U 2L2 U' 2R2 U // 167 moves total, so centers required 69 moves

Note: Every portion of the solve shown above was pre-computed, and looked up in its databases. It required no search.

I am writing procedures now where the algorithms are searched in cascade in RAM, rather than moves being searched. The search routine recursively takes an index into an array of RAM-resident algorithms, rather than recursively calling a move generator. Surprisingly, even a "depth 2" search in this fashion can have tremendous results. Instead of having a depth 12 radius for a search horizon, it instantly doubles to 24. But, as you know, some of these moves are spent reconstructing the cage each time, so one has to whittle down this distance to get a hypothetical "effective solving range" that is somewhat lower. The problem is, all 128 GB of RAM is required to do this for my 5x5x5 program.
I don't think anyone ever tried a cascaded algorithm search, so here's what one looks like:

The alternating colors indicate moves that are a part of different algorithms. So while this was a "depth 2" search (2 algs passed into the search), in this case, the depth being explored was 16 moves deep! Not a bad tradeoff (since only 35 seconds of search reached this deep, see the topmost half of the diagram).

The number reported as the search speed is "algs per second," so the actual equivalent movecount is at least 16 times faster, and up to 24 times faster when it gets to 12 move algs being paired with other 12 move algs.

And, for the sake of completeness, here is the scramble and subsequent solve of the corners that preceded the image above.

Code:
Scramble:
2D' 2L' F'  2F' 3U  2L  F'  L'  U2  R'
3U' 2B' 2L  U2  2B' 2F' 2R  R   3U  F
2B2 B2  3R2 3F  2B  3F  L2  3R2 2U  3R
R2  B2  3R2 2U  3R  B'  F2  B2  R   3F
F'  2R  R'  2R2 3U  2D' L'  2R' 2B' D
3F2 R'  F'  R'  3F2 L2  2L' F2  U2  B'
L'  R2  2U' 3R' 2L2 U2  3F  F   U   3F2
B2  2L' U2  D'  3F  B'  3U2 2R2 2F' 2L'
2R  U   3F' B'  3F2 R'  2B2 2U' 3R  U
2U' R'  2L2 R2  B2  U   2B  L   3U' 3F2
F'  B'  2U2 L   2U2 2B' D   2F' F2  2F2
2U2 2L' 3R  R   2R2 3F2 2F' L'  3R2 L
2D  3F  F2  2B' 2L  2U  L   2F  3F  L2
2R2 F   L

(133 moves total)

TOP
-------------------------
|&&&&|####|&&&&|XXXX|OOOO|
-------------------------
|~~~~|OOOO|####|####|XXXX|
-------------------------
|XXXX|&&&&|####|^^^^|~~~~|
-------------------------
|^^^^|&&&&|XXXX|&&&&|^^^^|
-------------------------
|XXXX|~~~~|~~~~|^^^^|XXXX|
-------------------------
LEFT                         FRONT                        RIGHT                        BACK
-------------------------    -------------------------    -------------------------    -------------------------
|^^^^|OOOO|OOOO|&&&&|OOOO|   |~~~~|XXXX|^^^^|####|~~~~|   |^^^^|&&&&|XXXX|OOOO|####|   |&&&&|^^^^|~~~~|XXXX|####|
-------------------------    -------------------------    -------------------------    -------------------------
|OOOO|^^^^|####|####|####|   |^^^^|####|&&&&|OOOO|~~~~|   |^^^^|~~~~|~~~~|XXXX|&&&&|   |####|XXXX|####|~~~~|####|
-------------------------    -------------------------    -------------------------    -------------------------
|&&&&|~~~~|XXXX|XXXX|####|   |OOOO|~~~~|^^^^|&&&&|^^^^|   |XXXX|&&&&|&&&&|^^^^|####|   |&&&&|^^^^|OOOO|XXXX|OOOO|
-------------------------    -------------------------    -------------------------    -------------------------
|~~~~|^^^^|^^^^|OOOO|####|   |XXXX|OOOO|OOOO|~~~~|^^^^|   |XXXX|^^^^|XXXX|####|&&&&|   |####|&&&&|~~~~|XXXX|XXXX|
-------------------------    -------------------------    -------------------------    -------------------------
|####|XXXX|^^^^|&&&&|^^^^|   |XXXX|&&&&|~~~~|^^^^|~~~~|   |^^^^|&&&&|XXXX|OOOO|OOOO|   |~~~~|OOOO|^^^^|&&&&|OOOO|
-------------------------    -------------------------    -------------------------    -------------------------

BOTTOM
-------------------------
|####|~~~~|OOOO|~~~~|&&&&|
-------------------------
|~~~~|&&&&|OOOO|^^^^|OOOO|
-------------------------
|&&&&|####|~~~~|OOOO|####|
-------------------------
|OOOO|~~~~|OOOO|XXXX|####|
-------------------------
|XXXX|OOOO|####|~~~~|&&&&|
-------------------------

Corners were solved with 09 moves: L'  B'  R   B'  R   U2  F   R'  U

TOP
-------------------------
|####|OOOO|####|####|####|
-------------------------
|XXXX|####|^^^^|&&&&|^^^^|
-------------------------
|^^^^|####|####|XXXX|~~~~|
-------------------------
|&&&&|OOOO|&&&&|&&&&|~~~~|
-------------------------
|####|^^^^|^^^^|~~~~|####|
-------------------------
LEFT                         FRONT                        RIGHT                        BACK
-------------------------    -------------------------    -------------------------    -------------------------
|XXXX|OOOO|&&&&|~~~~|XXXX|   |^^^^|XXXX|XXXX|^^^^|^^^^|   |&&&&|XXXX|^^^^|####|&&&&|   |OOOO|OOOO|XXXX|&&&&|OOOO|
-------------------------    -------------------------    -------------------------    -------------------------
|&&&&|####|XXXX|OOOO|~~~~|   |&&&&|OOOO|~~~~|####|XXXX|   |####|^^^^|&&&&|~~~~|OOOO|   |~~~~|XXXX|~~~~|&&&&|####|
-------------------------    -------------------------    -------------------------    -------------------------
|####|####|XXXX|^^^^|OOOO|   |~~~~|OOOO|^^^^|&&&&|OOOO|   |####|XXXX|&&&&|~~~~|OOOO|   |XXXX|XXXX|OOOO|^^^^|&&&&|
-------------------------    -------------------------    -------------------------    -------------------------
|&&&&|^^^^|~~~~|^^^^|~~~~|   |^^^^|~~~~|&&&&|OOOO|^^^^|   |####|####|^^^^|XXXX|&&&&|   |^^^^|~~~~|####|XXXX|####|
-------------------------    -------------------------    -------------------------    -------------------------
|XXXX|OOOO|&&&&|~~~~|XXXX|   |^^^^|XXXX|~~~~|^^^^|^^^^|   |&&&&|OOOO|####|~~~~|&&&&|   |OOOO|^^^^|~~~~|XXXX|OOOO|
-------------------------    -------------------------    -------------------------    -------------------------

BOTTOM
-------------------------
|~~~~|####|&&&&|XXXX|~~~~|
-------------------------
|XXXX|&&&&|OOOO|^^^^|&&&&|
-------------------------
|OOOO|####|~~~~|OOOO|^^^^|
-------------------------
|####|~~~~|OOOO|XXXX|OOOO|
-------------------------
|~~~~|OOOO|XXXX|&&&&|~~~~|
-------------------------

Last edited:

##### Member
The premise that I hold to is, that with enough knowledge, the total count of moves required to solve the cage's centers should approach the number of moves required to solve centers first.
What makes you think that? Intuitively I would think that not having to preserve edges will result in a lot less moves.

For instance, here's your cage solve, I removed your center solution and solved the centers manually ignoring the edges with very little effort put into doing so efficiently (I basically did what I would have done in a speedsolve).

L' B' U L2 U F' U' F2 U' R2 // corners solved in 10
R F U' 2L D L' D' 2L' B F' L R' // 11 edges
L D' 2R2 D L' R D' 2R2 D R' // 15 edges
3R U' 3R' D 3F' D2 3F 3R U 3R' D // 19 edges
2U' B' D' 3R D2 3R' B 2U B' D' B // 23 edges
F' 2L' F R2 F2 R F 2L F' R' F2 R2 // 27 edges
2D2 2U' F' U' F 2D2 2U2 F' U F 2U' // 30 edges
2B U' 2B' F2 L' 2B L F2 U L' 2B' L // 33 edges
F R' F 2R2 F' R F 2R2 F2 // cage completed in 98 moves total

// Solving centers only
R 2U 2L' B' 2L D' 2R B' 2D2 B2 2D2 B 2D' // Right
D' 2L' F 2L L F' 2U L 2U' // Front
U 2B L 2B' 3U L2 3U' D U2 2B D2 L2 2B' // Down
B' 2R B 2R' U' 2L U 2L' U 2F' L2 2F // Left
2R' U' 2R 3R U2 3R' B 2L U' 2L' U 2L U 2L' // Up and Back

61 moves to solve the centers

The center solving stage at the end required 69 moves. From what I have seen posted around, 69 moves for solving the centers isn't that bad.
69 is OK for a speedsolve, but not so much if you're attempting to solve them optimally.

Mods: I'm guessing unsolved will ask you to delete this post. If you choose to do so, please let me know which rule I broke so I can be more careful next time. Thanks.

#### mark49152

##### Super Moderator
Staff member
the program has been able to "beat the scramble count" on a few solves. Longer scrambles tend to produce harder solves, up until a certain point. When the program takes "too long" to solve, I hunt for ways to improve it.
Perhaps I missed something but I'm afraid I don't follow your logic. Why not just use 10000 move scrambles? Then you will know you have a well-randomised cube as a fair test for your solver, and also a better chance of a solution that beats the scramble count.

#### unsolved

##### Member
What makes you think that? Intuitively I would think that not having to preserve edges will result in a lot less moves.
1. Proper English is "fewer moves" and not "less moves."
2. In my conjecture, I carefully used the words "with enough knowledge" and "should approach." Those stipulations, as stated, make the premise difficult to refute.

For instance, here's your cage solve, I removed your center solution and solved the centers manually ignoring the edges with very little effort put into doing so efficiently (I basically did what I would have done in a speedsolve).

... 61 moves to solve the centers ...

69 is OK for a speedsolve, but not so much if you're attempting to solve them optimally.
You are not understanding what is happening programming-wise. This is why I asked, in my initial post, only for programmers who are actually writing 5x5x5 code to respond. Some of the information to follow becomes revealed to the programmer at one point in time, once said programmer becomes immersed in the challenges of 5x5x5 programming. The rest of the info should underscore why these results are the beginning of what will soon become even more groundbreaking.

1. At no point in the program's center solve did it search. It did a database lookup. This is much faster than searching, and by much faster I mean about 1000 x 1000 x 1000 x 1000 times faster.

2. There are 5,249,024,392,428,376,695 nodes that need to be explored on the 5x5x5 to complete depth 11. That's pronounced "5 quintillion" in American math prefix jargon. The center database lookup retrieves up to 11-move solutions in the blink of any eye. Just to let you know, the previous speed estimate was not an exaggeration.

3. If you still find that this is not significant, re-attempt your centers-only solve with the limitation you can't execute more than 11 moves at any given time to complete an intermediate goal.

4. If you are successful at item #3 above, try and repeat it with the cage solved.

5. In case there is need of further delineation, you took 61 moves to solve the centers, while destroying everything else. The program took 8 more moves, while preserving everything. If you subtract from the program's moves all of the cage-resolving, the number drops drastically.

6. Now try and imagine how the move count will drop once the program adds all 12-turn, 13-turn, and 14-turn algs to its centers database. It is easy to see, my premise is correct. This is the "beginning of an outline" that leads to success. Adding more knowledge, while applying this technique, will eventually reduce the movecount to such an extent, it should be able to complete the centers within a cage in as many (or fewer) moves as even the keenest reduction solve where centers are solved first.

If you need a more concrete example of how pre-solved algs are the way to go for the 5x5x, I offer this:

The numbers inside the curly braces indicate "alg numbers" that were fed to the recursive search. At present, I have 95,513,100 different edge algorithms. Unfortunately, pairing them all up depth after depth would take hundreds of years, but it's still possible to examine every 4-move alg against every alg 4-12 moves in length remarkably quickly. In 1:31 I basically examined every ad hoc 16-move alg possible. After 38:05, I have my first "depth 17" result, where a 5-move alg + a 12-move alg produced a position with even more edges solved.

Depth 16 has 294,643,579,537,160,864,966,536,695 nodes on the 5x5x5.
Depth 17 has 10,450,586,401,808,707,204,742,536,695 nodes on the 5x5x5.

If there is a faster way to examine such search spaces, I'd be interested in hearing about it.

EDIT: A good example of when the RAM-probed algorithms have a huge payout:

Last edited:

##### Member
1. Proper English is "fewer moves" and not "less moves."
Thanks! It's always good for me to learn more English. It's not my first language, so it's a lot worse than my Italian and Spanish, but certainly better than my German and Japanese. I barely passed JLPT N4 last year (embarrassing, I know). Just out of curiosity, how many languages do you speak?

2. In my conjecture, I carefully used the words "with enough knowledge" and "should approach." Those stipulations, as stated, make the premise difficult to refute.
I'm just asking why you think that's the case. It seems fairly obvious that with more restrictions you'll need to spend more moves to solve pieces.

You are not understanding what is happening programming-wise. This is why I asked, in my initial post, only for programmers who are actually writing 5x5x5 code to respond.
So you wouldn't accept help from people like Herbert Kociemba or Tom Rokicki unless they happen to be working on a 5x5x5 solver? Most of the information you presented seems incredibly specific to your program, not to 5x5x5 software in general. If I were to write a solver that only uses commutators to solve the cube, for instance, I wouldn't need to figure out how many nodes need to be explored to reach depth 11.

1. At no point in the program's center solve did it search. It did a database lookup. This is much faster than searching, and by much faster I mean about 1000 x 1000 x 1000 x 1000 times faster.
2. There are 5,249,024,392,428,376,695 nodes that need to be explored on the 5x5x5 to complete depth 11. That's pronounced "5 quintillion" in American math prefix jargon. The center database lookup retrieves up to 11-move solutions in the blink of any eye. Just to let you know, the previous speed estimate was not an exaggeration.
Neat, but finding a solution quickly doesn't mean that you've found a good one.

3. If you still find that this is not significant, re-attempt your centers-only solve with the limitation you can't execute more than 11 moves at any given time to complete an intermediate goal.
For me to be able to try this, I would need to know your definition of "intermediate goal".

4. If you are successful at item #3 above, try and repeat it with the cage solved.
I probably wouldn't be able to, but that's exactly my point. You're saying that solving the centers with or without a solved cage will take a similar amount of moves (oh, I'm sorry, I should have said "with enough knowledge" and "should approach" to make it sound more plausible); a statement I disagree with. If I try this and end up spending more moves to solve the centers because I need to preserve the cage, that would agree with my position, not yours.

5. In case there is need of further delineation, you took 61 moves to solve the centers, while destroying everything else. The program took 8 more moves, while preserving everything. If you subtract from the program's moves all of the cage-resolving, the number drops drastically.
That directly contradicts your premise "with enough knowledge, the total count of moves required to solve the cage's centers should approach the number of moves required to solve centers first".

6. Now try and imagine how the move count will drop once the program adds all 12-turn, 13-turn, and 14-turn algs to its centers database. It is easy to see, my premise is correct. This is the "beginning of an outline" that leads to success. Adding more knowledge, while applying this technique, will eventually reduce the movecount to such an extent, it should be able to complete the centers within a cage in as many (or fewer) moves as even the keenest reduction solve where centers are solved first.
Take as an example my admittedly mediocre 61 move solution for the centers in the scramble you posted. I started by solving a 1x1x3 block by doing R 2U. Solving those same 3 pieces while preserving the edges requires a minimum of 8 moves, regardless of the amount of knowledge in your db. How could adding restrictions possibly result in fewer moves? (See how I used "fewer" there instead of "less"? I have you to thank for that)

#### unsolved

##### Member
1. I've been published in 2 different languages. I know 27 altogether, if you count verbose computer languages. I am currently cracking the riddle of the Etruscan language in my spare time. I'll the first person in 2000 years to understand it once it's solved.

2. Don't think I'm under obligation to answer every question you post. You have a belligerent attitude towards me, and I find it annoying. At any moment, I reserve the right to discontinue discussions with you without notice. Consider lack of replies on my part as a strong indication this has occurred.

So you wouldn't accept help from people like Herbert Kociemba or Tom Rokicki unless they happen to be working on a 5x5x5 solver?
Re-read my first post. If you're going to participate here, pay attention.

Neat, but finding a solution quickly doesn't mean that you've found a good one.
That either undermines the entire notion of speedsolving (if quick = "as in time") or is a complete contradiction (if quick = "as in fewest or nearly the fewest possible moves"). Therefore, I disagree.

That directly contradicts your premise "with enough knowledge, the total count of moves required to solve the cage's centers should approach the number of moves required to solve centers first".
No it doesn't. My statement, as it is written, is factual. It is possible to solve the entire cage in one fell swoop. Here is an example where 12 centers were solved at the start of the cage (and 6 of these are fixed from the start) yet after merely 11 moves, an additional 19 centers were solved.

2R2 2U' 2R 3U2 2F' 2L2 2U 2R 3U2 2F 2L2 // gaining 19 centers at once

How could adding restrictions possibly result in fewer moves?
Your thinking is very restricted. If you had any understanding of what the larger databases could do, you wouldn't be asking that question. As more algs are added, fewer cage-revisits are necessary.

Until you show me a program you have written (as you have claimed) I must conclude you are not a programmer. You simply do not demonstrate any traits that I attribute to knowledgeable programmers.

Last edited:

##### Member
1. I've been published in 2 different languages. I know 27 altogether, if you count verbose computer languages. I am currently cracking the riddle of the Etruscan language in my spare time. I'll the first person in 2000 years to understand it once it's solved.
Which languages do you speak? Is English your main one? And no, of course I wouldn't count verbose computer languages...

Re-read my first post. If you're going to participate here, pay attention.
I was responding directly to your post, where you said "This is why I asked, in my initial post, only for programmers who are actually writing 5x5x5 code to respond". I'm not going to re-read the OP every time I post here to keep track of your constant edits.

That either undermines the entire notion of speedsolving (if quick = "as in time") or is a complete contradiction (if quick = "as in fewest or nearly the fewest possible moves"). Therefore, I disagree.
I meant quick as in time. And I was under the assumption that the intention of your program was to find near optimal solutions to 5x5x5 scrambles, not speedsolving friendly ones.

No it doesn't. My statement, as it is written, is factual. It is possible to solve the entire cage in one fell swoop. Here is an example where 12 centers were solved at the start of the cage (and 6 of these are fixed from the start) yet after merely 11 moves, an additional 19 centers were solved.

2R2 2U' 2R 3U2 2F' 2L2 2U 2R 3U2 2F 2L2 // gaining 19 centers at once
My point remains. What makes you think that you would need more moves to achieve the same (gaining 19 centers with 11 moves) if you weren't having to maintain the cage?

Your thinking is very restricted. If you had any understanding of what the larger databases could do, you wouldn't be asking that question. As more algs are added, fewer cage-revisits are necessary.
The algs you're storing in your db solve n centers at a time without affecting the rest of the cube (correct me if I'm wrong). That's fine when you have already solved a portion of the cube (ie: the cage) and don't want to destroy it. But you shouldn't assume so easily that center solutions found using that approach will outperform center solutions that don't have restrictions in how they affect edges or corners.

Until you show me a program you have written (as you have claimed) I must conclude you are not a programmer. You simply do not demonstrate any traits that I attribute to knowledgeable programmers.
Check out http://www.scrambld.cubing.net. If you input a scramble, it produces a commutator-based solution for the cube (it's not meant to be efficient, it's an implementation of the best method that's been discovered for blindfolded solving at the moment).

#### Herbert Kociemba

##### Member
My point remains. What makes you think that you would need more moves to achieve the same (gaining 19 centers with 11 moves) if you weren't having to maintain the cage?
I believe unsolved means that his method which is making the cage first + solving the centers gives about the same move count as solving the centers first and then making the cage. This may be correct, though I would not recommend any of these two methods for a solver which claims to give short solutions.

#### unsolved

##### Member
I believe unsolved means that his method which is making the cage first + solving the centers gives about the same move count as solving the centers first and then making the cage.
My premise is essentially this: Whether you solve the centers first via reduction, or last via the cage, the sum of the moves for solving the center-portion-only will be similar, given that a program with enough knowledge is used to complete the cage, and not a human.

Think of a hypothetically-omniscient program. Technically, given any cage, it could solve the remaining centers in one pass, thereby reconstructing the cage only one time. Such a thin move count must, by definition, approach the sum of the moves taken during an optimal centers-first solve. Recall my choice of the word "approach" earlier in a prior post. Think of it as a "limit" in calculus. I never claimed a cage-center-solve always outperforms an uncaged solve of centers. I said, in time, with enough knowledge, the cage-solve-center-count will improve over the typical human count to solve centers first.

This may be correct, though I would not recommend any of these two methods for a solver which claims to give short solutions.
Getting close to God's Number of moves to solve the 5x5x5 will be very difficult. As of this moment in 2016, we don't have much data on what a "long" or "short" solution is for the 5x5x5. My program can solve the corners optimally from any scramble, but that's nothing new. The only thing I did differently was store all 24 possible rotated cube states for all corner positions, plus solve the corners with respect to centers.

Right now, I am trying for intermediate goals of sub-30 for center solving and sub-40 for cage construction. That would give an overall move count of 80 per solve. I think that is reasonably short for the 5x5x5. Once my 13-turn edge database and 12-turn centers databases are completed, I believe the program will be able to solve any 5x5x5 scramble in 100 moves or fewer.

Last edited:

#### xyzzy

##### Member
Writing a 5x5x5 solver seems like an interesting challenge; I might try this, but I'm not a very good programmer so it might take approximately forever to finish it.

My premise is essentially this: Whether you solve the centers first via reduction, or last via the cage, the sum of the moves for solving the center-portion-only will be similar, given that a program with enough knowledge is used to complete the cage, and not a human.
For whatever move sequence you come up with to solve the centres while preserving the cage, you can apply that exact same sequence to solve the centres first. Consequently, the shortest centre solve disregarding the cage is necessarily at most as long as the shortest centre solve while preserving the cage, and very likely to be much shorter.

If I'm interpreting you right, the problem with the centre-first approach as implemented on a computer is that your strategy of caching all move sequences up to 11 moves preserving the cage is no longer applicable (because now you have to cache all move sequences, and there simply are too many for that to be physically possible), and so you don't get amazing speedups. I don't think we should take this to mean that a centre-first approach is necessarily infeasible, just that we don't know a good way of doing it yet. (Maybe that's what I'll try?)

#### unsolved

##### Member
Consequently, the shortest centre solve disregarding the cage is necessarily at most as long as the shortest centre solve while preserving the cage, and very likely to be much shorter.
If you remove the word "much," I would agree. If there exists an optimal solution to solve centers in "n moves" disregarding the rest of the cube, I say there is a corresponding solution in "n + k" moves, where k is small.

I don't think we should take this to mean that a centre-first approach is necessarily infeasible, just that we don't know a good way of doing it yet. (Maybe that's what I'll try?)
I did outline a way to do this a while back. It's pretty easy, because, as you mentioned, every other way of storing moves is unfeasible or just results in capturing every legal move anyway. The idea is to generate every possible position of 1 center unsolved vs. 1 center unsolved on adjacent faces, generate the move sequence that solves that, then move on to 2 against 2, 3 against 3 ... up to 8 against 8. If you disregard the rest of the cube, I think the max move length for the entire set was something like 15 moves.

I also did it for caged centers 2 against 2 (there are 328 unique positions), 3 against 3, etc. Here is the longest solution for a 2 against 2 case:

3R U' 2R U 3R' U' 2U2 2R' U2 2R 2U2 2R' U'

Fortunately, there is only one entry for 8 centers against 8 centers:

2R' U' 3R' D 2R2 3F2 2R2 3F2 D' 3R D F2 D' U 2R 2L U' D F2 U D' 2L'

And here are some examples of how to do it without preserving the cage:

Moving 3 centers at a time, top to front
2R U2 2L' U 2R' 3F R2 3F' 2L2 F 2L'

Moving 4 centers at a time, top to front
2R 3R U 3R' U' 2R2 F 2L 2R F 2L'

Moving 5 centers at a time, top to front
2R U 2R' U2 2L' 3F U2 3F' 2L2 F 2L'

Once you do this for all possible cases (there's not too many compared to the total node count per depth) then you have a set of algs you can apply "blindly" to a cube position without have to call a move generator. Just count the number of solved centers after you apply each sequence, and go with the winner, and repeat. You can solve the centers in seconds that way.

Last edited:

#### Herbert Kociemba

##### Member
If you remove the word "much," I would agree. If there exists an optimal solution to solve centers in "n moves" disregarding the rest of the cube, I say there is a corresponding solution in "n + k" moves, where k is small.
Can you define "small" please? Is it small, when k=n/2 for example?
On the 3x3x3, solving the edges alone takes at most 14 moves in FTM. But solving the edges without destroying the corners takes 20 moves (for example superflip)

Right now, I am trying for intermediate goals of sub-30 for center solving and sub-40 for cage construction. That would give an overall move count of 80 per solve.
You mean solving the centers sub-30 while maintaining the cage? I do not think this is possible. Solving the centers alone without any further restrictions takes at least 20 moves in STM.

#### unsolved

##### Member
Can you define "small" please? Is it small, when k=n/2 for example? On the 3x3x3, solving the edges alone takes at most 14 moves in FTM. But solving the edges without destroying the corners takes 20 moves (for example superflip)
I would estimate k <= 8 in the case of the 5x5x5. Oddly enough, the more centers you move at once, the smaller the difference in moves between cage solving and reduction-phase-1 solving. There are some cases where k = 0; namely the only way to solve all of those centers (in that specific example) produces a sequence where the cage would be left unaffected as well.

You mean solving the centers sub-30 while maintaining the cage?
Yes.

I do not think this is possible. Solving the centers alone without any further restrictions takes at least 20 moves in STM.
In that case, I say k <= 9.

Remember, I have already solved every cage position up to 11 moves. That means I can find a 22-move solution by loading up a hash table with moves made by every 11-move "alg" played in reverse from a solved cube. I loop through all 11-move algs, apply them to a cube I am trying to solve, then test to see if the resulting cube is anywhere in my 11-move hash table. If I do find a match, I know there is at least one path to the solution in 22 moves (or less). If not, I keep searching, apply the alg that solves the greatest number of centers, and try again.

One of the things that is unique about the cage: No matter what REMAINS to be solved, it must be solved by an alg that would CREATE a cage if run in reverse! Therefore you only need to run cage algs on the cage, without having to consider searching any other moves.

Here is one 22-move solution:

https://alg.cubing.net/?type=alg&puzzle=5x5x5&alg=2R-_U-_3R-_D_2R2_3F2_2R2_3F2_D-_3R_D_F2_D-_U_2R_2L_U-_D_F2_U_D-_2L-&title=moving 8 centers top to front&view=playback

Last edited:

#### xyzzy

##### Member
I would estimate k <= 8 in the case of the 5x5x5. Oddly enough, the more centers you move at once, the smaller the difference in moves between cage solving and reduction-phase-1 solving. There are some cases where k = 0; namely the only way to solve all of those centers (in that specific example) produces a sequence where the cage would be left unaffected as well.
I spent the last few days coding stuff and finally finished a centre (+ wing parity) solver. (Like I said, not a good programmer, yada yada.) It's a very simple three-phase solver, using the intermediate subsets <U, D, R, L, F, B, Uw, Dw, Rw2, Lw2, Fw2, Bw2> and <U, D, R, L, F, B, Uw2, Dw2, Rw2, Lw2, Fw2, Bw2>, and taking only the first optimal solution found for each phase. It doesn't directly extend into a solver for the whole cube, but I have some other ideas as to how to implement that.

I threw a ~180-move scramble into it, and it spat out a 33-move centre solution after about five minutes and a half. There's definitely a lot of room for optimisation here (symmetry reduction, larger pruning tables, hardcoding constants, etc.), but speed aside, I believe this should be some evidence that solving the centres without preserving the cage can be a lot more efficient in terms of move count.

(OBTM was used rather than SSTM, but I don't think that this'll affect move count significantly for centres-first. Even converted to single-slice turns, the move count of the aforementioned solution increases to only 49 moves.)

Edit: Here's the solution. (Scramble not included.)
U Fw' Uw2 Lw Dw2 Fw Bw U Lw' U Bw // phase 1
R F' B Rw2 Fw2 Bw2 Uw L' Rw2 Dw // phase 2
D2 Dw2 Fw2 R Rw2 B' Bw2 L' Rw2 B' Uw2 R Fw2 // phase 3

Last edited:

#### unsolved

##### Member
I threw a ~180-move scramble into it, and it spat out a 33-move centre solution after about five minutes and a half.
That's a good start for a short coding duration. It is possible to get over 30 of the centers solved in under 11 moves in most instances, from what I have found (when I was just searching from the baseline scramble). Once you implement pruning techniques, your program should see the same type of results.

I finished adding the 12-turn edge database access code. Generating the database is one thing, getting it to work with the program is another.

My most recent test scramble of 200 moves with the cage solved in 78:

U' R' B' R' B2 R' F' // corners in 7
R L' 2B' D' F' B U' D F U 2B U'
B2 D B2 R2 D2 B2 D2 F2 U' F2 R2
2L' B' 2L2 2R B L B' 2L2 2R' B L' 2L
2R D2 B' 3R' 2D2 B D2 B' 2D2 3R B 2R'
D 2L' U 2L D' U' L2 U 2L' U' L2 2L
2L' F D2 2R' D2 2R' D2 2R' D2 2R2 F' 2L // cage completed in 78 moves

It looks like that 12-turn edge database was worth the effort! I don't think it will be able to dodge odd-parity situations forever though.

#### unsolved

##### Member
In other news... I started on the 13-move edge algorithms and hooked part of it to the latest version of the program. I think it found a 7-cycle mix of edges and wings that is probably not in your everyday alg list:

R' 2D F' D' 3R2 D2 3R2 F 2D' F' D' F R

#### xyzzy

##### Member
It is possible to get over 30 of the centers solved in under 11 moves in most instances, from what I have found (when I was just searching from the baseline scramble). Once you implement pruning techniques, your program should see the same type of results.
I'm not using a hill climbing approach (well, mostly not using), so having however many centre pieces solved within the first few moves isn't important. Besides, it's always the last few unsolved pieces that take the most moves if you want to keep the solved pieces intact. I'm just copying the ideas of earlier computer solvers like Thistlethwaite's algorithm, Kociemba's, Shuang Chen's, etc. where the pieces are just "partially solved" in an early stage and fully solved in the final stage; this strategy generally seems to lead to a low-ish move count.

I think it found a 7-cycle mix of edges and wings that is probably not in your everyday alg list:

R' 2D F' D' 3R2 D2 3R2 F 2D' F' D' F R
This can be decomposed as [R' : [2D, F' D F]] (3-cycle of wings) with [D2, 3R2] (a pair of 2-cycles of midges) inserted to cancel one move. While the alg as a whole definitely isn't in anyone's repertoire, it's built from commutators, which are pretty well understood.

On another note, I did some optimisation to my centre solver and it now runs at about twice the speed, but I'm not going to put any effort into further optimisation since I'm trying to implement a five-phase reduction algorithm (plus one more phase for 3x3x3 solving) that doesn't have all the centres solved up front. I coded the third phase over the past two days, and I expect to have the full solver done in a few more days. I'll describe it in more detail if my five-phase reduction algorithm doesn't turn out to be fatally flawed.

This is probably the last time I'll be running the centre-only solver (lol):
U Lw' Bw2 Dw' F2 Lw' Fw R2 Bw' Rw Fw // phase 1
B Dw Lw2 F Rw2 Bw2 Uw Dw' R' L Uw // phase 2
U R' F Rw2 Dw2 Rw2 D F2 Rw2 D Bw2 // phase 3.1
U2 Uw2 Bw2 L Rw2 U2 B' Dw2 Fw2 Lw2 Dw2 // phase 3.2

Status
Not open for further replies.


text:
# Parameters and priors¶

Synopsis: Class containing the prior and reference pdf, and other parameter information. Jesus Torrado

## Basic parameter specification¶

The params block contains all the information intrinsic to the parameters of the model: their prior pdf and reference pdf, their latex labels, and useful properties for particular samplers (e.g. width of a proposal pdf in an MCMC – see the documentation for each sampler). The prior and reference pdf are managed by the Prior class.

You can specify three different kinds of parameters:

• Fixed parameters are specified by assigning them a value, and are passed directly to the likelihood or theory code.
• Sampled parameters need a prior pdf definition and, optionally, a reference pdf (ref), a LaTeX label to be used when producing plots, and additional properties to aid particular samplers.
• Derived parameters do not have a prior definition (neither a reference value or pdf), but can have a LaTeX label and a min and/or max to be used in the sample analysis (e.g. to guess the pdf tails correctly if the derived quantity needs to be positive or negative – defaulted to -.inf, .inf resp.).

The (optional) reference pdf (ref) for sampled parameters defines the region of the prior which is of most interest (e.g. where most of the prior mass is expected); samplers needing an initial point for a chain will attempt to draw it from the ref if it has been defined (otherwise from the prior). A good reference pdf will avoid a long burn-in stage during the sampling. If you assign a single value to ref, samplers will always start from that value; however this makes convergence tests less reliable as each chain will start from the same point (so all chains could be stuck near the same point).

The syntax for priors and ref’s has the following fields:

• dist (default: uniform): any 1-dimensional continuous distribution from scipy.stats; e.g. uniform, [log]norm for a [log-]gaussian, or halfnorm for a half-gaussian.
• loc and scale (default: 0 and 1, resp.): the location and scale of the pdf, as they are understood for each particular pdf in scipy.stats; e.g. for a uniform pdf, loc is the lower bound and scale is the length of the domain, whereas in a gaussian (norm) loc is the mean and scale is the standard deviation).
• Additional specific parameters of the distribution, e.g. a and b as the powers of a Beta pdf.

Note

For bound distributions (e.g. uniform, beta…), you can use the more intuitive arguments min and max (default: 0 and 1 resp.) instead of loc and scale (NB: unexpected behaviour for an unbounded pdf).

The order of the parameters is conserved in the table of samples, except that derived parameters are always moved to the end.

An example params block:

params:

A: 1 # fixed!

B1:  # sampled! with uniform prior on [-1,1] and ref pdf N(mu=0,sigma=0.25)
prior:
min: -1
max:  1
ref:
dist: norm
loc:   0
scale: 0.25
latex: \mathcal{B}_2
proposal: 0.25

B2:  # sampled! with prior N(mu=0.5,sigma=3) and fixed reference value 1
prior:
dist: norm
loc: 0.5
scale: 3
ref: 1  # fixed reference value: all chains start here!
latex: \mathcal{B}_2
proposal: 0.5

C:  # derived!
min: 0
latex: \mathcal{C}

You can find another basic example here.

## Multidimensional priors¶

The priors described above are obviously 1-dimensional. You can also define more complicated, multidimensional priors using a prior block at the base level (i.e. not indented), as in the the advanced example. All the details below also apply to the definition of external likelihoods. We will call these custom priors “external priors”.

Inside the prior block, list a pair of priors as [name]: [function], where the functions must return log-priors. This priors will be multiplied by the one-dimensional ones defined above. Even if you define an prior for some parameters in the prior block, you still have to specify their bounds in the params block.

A prior function can be specified in two different ways:

1. As a function, either assigning a function defined with def, or a lambda. Its arguments must be known parameter names.
2. As a string, which will be passed to eval(). The string can be a lambda function definition with known parameters as its arguments (you can use scipy.stats and numpy as stats and np resp.), or an import_module('filename').function statement if your function is defined in a separate file filename in the current folder and is named function (see e.g. the advanced example).

Note

Your function definition may contain keyword arguments that aren’t known parameter names. They will simply be ignored and left to their default.

Warning

When resuming a run using an external python object as input (e.g. a prior or a likelihood), there is no way for Cobaya to know whether the new object is the same as the old one: it is left to the user to ensure reproducibility of those objects between runs.

Warning

At this moment, external priors can only be functions of sampled and fixed parameters. This may be extended in the future to dependence on derived parameters, probably just for dynamically defined ones, but not for those computed by the theory code, since otherwise the full prior could not be computed before the likelihood, preventing us from avoiding computing the likelihood when the prior is null, or forcing a post-call to the prior.

Workaround #1: If the derived parameter(s) can be computed easily from sampled and fixed parameters, do the computation inside the call to the external prior.

Workaround #2: Define your function as a external likelihood instead, since likelihoods do have access to derived parameters (for an example, see this comment).

## Prior normalization for evidence computation¶

The one-dimensional priors defined within the params block are automatically normalized, so any sampler that computes the evidence will produce the right results as long as no external priors have been defined, whose normalization is unknown.

To get the prior normalization if using external functions as priors, you can substitute your likelihood by the dummy unit likelihood, and make an initial run with PolyChord to get the prior volume (see section Computing Bayes ratios).

In general, avoid improper priors, since they will produce unexpected errors, e.g.

params:
a:
prior:
min: -.inf
max:  .inf

## Defining parameters dynamically¶

We may want to sample in a parameter space different than the one understood by the likelihood, e.g. because we expect the posterior to be simpler on the alternative parameters.

For instance, in the advanced example, the posterior on the radius and the angle is a gaussian times a uniform, instead of a more complicated gaussian ring. This is done in a simple way at the end of the example. Let us discuss the general case here.

To enable this, cobaya creates a re-parameterization layer between the sampled parameters, and the input parameters of the likelihood. E.g. if we want to sample from the logarithm of an input parameter of the likelihood, we would do:

params:
logx:
prior: [...]
drop: True
x: "lambda logx: np.exp(x)"
y:
derived: "lambda x: x**2"

When that information is loaded cobaya will create an interface between two sets of parameters:

• Sampled parameters, i.e. those that have a prior, including logx but not x (it does not have a prior: it’s fixed by a function). Those are the ones with which the sampler interacts. Since the likelihood does not understand them, they must be dropped with drop: True.
• Likelihood input parameters: those that will be passed to the likelihood (or theory). They are identified by either having a prior and not being dropped, or having being assigned a fixed value or a function. Here, x would be an input parameter, but not logx.

We can use a similar approach to define dynamical derived parameters, which can depend on input and sampled parameters. To distinguish their notation from that of input parameters, we insert the functions defining them under a derived property (see the parameter y in the example above).

Note

Dynamical derived parameters can also be functions of yet-undefined parameters. In that case, those parameters will be automatically requested from the likelihood (or theory code) that understands them.

Note

Also available are the $$\chi^2 = -2 \log \mathcal{L}$$ of the used likelihoods, as chi2__[name], e.g.

likelihood:
my_like: [...]
params:
my_derived:
derived: "lambda chi2__my_like: [...]"

Note

By default, the values of dynamical input parameters (e.g. x above) are saved as if they were derived parameters. If you would like to ignore them, define them using the following extended notation:

params:
x:
value: "lambda logx: np.exp(logx)"
derived: False

Note

If you want to fix the value of a parameter whose only role is being an argument of a dynamically defined one and is not supposed to be passed to the likelihood, you need to explicitly drop it. E.g. suppose that you want to sample from a likelihood that depends on x, but want to use log(x) as the sampled parameter; you would do it like this:

params:
logx:
prior: [...]
drop: True
x:
value: "lambda logx: np.exp(x)"

Now, if you want to fix the value of logx without changing the structure of the input, do

params:
logx:
value: [fixed_value]
drop: True
x:
value: "lambda logx: np.exp(x)"

## Changing and redefining parameters; inheritance¶

As we will see in the likelihoods documentation, just by mentioning a likelihood, the parameters of its default experimental model are inherited without needing to re-state them.

But you may want to fix their value, re-define their prior or some other property in your input file. To do that, simply state you new parameter definition as you would normally do. For your convenience, if you do that, you don’t need to re-state all of the properties of the parameters (e.g. the latex label if just changing the prior).

As a general rule, when trying to redefine anything in a parameter, everything not re-defined is inherited, except for the prior, which must not be inheritable in order to allow re-defining sampled parameters into something else.

Just give it a try and it should work fine, but, in case you need the details:

• Re-defining fixed into:
• fixed: simply assign it a new value
• sampled: define a prior for it (and optionally reference, label, etc.)
• derived: mention the parameter and assign nothing to it (you may define a min, max or latex label, but not a prior)
• Re-defining sampled into:
• fixed: simply assign it a value
• sampled: change any of prior/ref/latex, etc, to your taste; the rest are inherited from the defaults
• derived: mention the parameter and assign nothing to it (you may define a min, max or latex label, but not a prior; the label is inherited from the defaults)
• Re-defining derived into:
• fixed: simply assign it a value
• sampled: define a prior for it (and optionally reference, label, etc.)
• derived: change any of prior/ref/latex, etc, to your taste; the rest are inherited from the defaults

## prior class¶

class cobaya.prior.Prior(parameterization, info_prior=None)

Class managing the prior and reference pdf’s.

d()
Returns: Dimensionality of the parameter space.
bounds(confidence_for_unbounded=1)

For unbounded parameters, if confidence_for_unbounded < 1 given, the returned interval contains the requested confidence level interval with equal areas around the median.

Returns: An array of bounds [min,max] for the parameters, in the order given by the input.

NB: If an external prior has been defined, the bounds given in the ‘prior’ sub-block of that particular parameter’s info may not be faithful to the externally defined prior.

sample(n=1, ignore_external=False)

Generates samples from the prior pdf.

If an external prior has been defined, it is not possible to sample from the prior directly. In that case, if you want to sample from the “default” pdf (i.e. ignoring the external prior), set ignore_external=True.

Returns: Array of n samples from the prior, as vectors [value of param 1, ...].
logps(x)

Takes a point (sampled parameter values, in the correct order).

Returns: An array of the prior log-probability densities of the given point or array of points. The first element on the list is the products of 1d priors specified in the params block, and the following ones (if present) are the priors specified in the prior block in the same order.
logp(x)

Takes a point (sampled parameter values, in the correct order).

Returns: The prior log-probability density of the given point or array of points.
logps_external(x)

Evaluates the logprior using the external prior only.

covmat(ignore_external=False)
Returns: The covariance matrix of the prior.
reference(max_tries=inf, warn_if_tries='10d', ignore_fixed=False, warn_if_no_ref=True)
Returns: One sample from the ref pdf. For those parameters that do not have a ref pdf defined, their value is sampled from the prior.

If ignored_fixed=True (default: False), fixed reference values will be ignored in favor of the full prior, ensuring some randomness for all parameters (useful e.g. to prevent caching when measuring speeds).

NB: The way this function works may be a little dangerous: if two parameters have an (external) joint prior defined and only one of them has a reference pdf, one should sample the other from the joint prior conditioned to the first one being drawn from the reference. Otherwise, one may end up with a point with null prior pdf. In any case, it should work for getting initial reference points, e.g. for an MCMC chain.

reference_covmat()
Returns: The standard deviation of the 1d ref pdf’s. For those parameters that do not have a ref pdf defined, the standard deviation of the prior is taken instead.


text:
Size and density of the planets

The planets appear to be divided according to size and density.

The inner planets are small and rocky (the terrestrial planets):

• Mercury
• Venus
• Earth
• Mars

The outer planets are 'gas giants':

• Jupiter
• Saturn
• Uranus
• Neptune

Nearly every planet has an atmosphere.

Note: Pluto (formerly regarded as a planet) has been re-classified as a dwarf planet in the Kuiper meteorite belt. It may be further declassified to a binary dwarf planet, as it is only slightly larger than its moon. (International Astronomical Union


text:
# [FOM] Iterating under Con(T)

hendrik@topoi.pooq.com hendrik at topoi.pooq.com
Wed Mar 22 08:42:33 EST 2006

```On Fri, Mar 10, 2006 at 02:46:46PM -0500, Richard Heck wrote:
> joeshipman at aol.com wrote:
> > Heck:
> >> To make the question more precise, define the following sequence of
> >> theories by transfinite recursion:
> >> T_0 = PA
> >> T_{k+1} = T_k + Con(T_k)
> >> T_l = \cup_{k<l} T_k, for l a limit
> > ...[S]houldn't you be closing each step under logical implication?
Or is there some other worry I've missed?

There might be multiple Con(T_k) at a limit ordinal k, from different
descriptions of the set of formulas in the theory at that point.  In
this case, you might need dependent choice to continue your
construction.  It's not clear to me to what extent you want to perform


text:
# Poisson or Linear Regression for Time Data

I am trying to model time-elapsed data (time from event A to event B) and am stuck on deciding between standard multiple linear regression vs. Poisson regression. A number of papers published on a similar topic seem to use Poisson regression, but in my head I've always associated the Poisson distribution with "count" data. What are your thoughts?

Thanks!

Back to your question: if you have the difference in time between event A to event B for each object, i.e., $y =time_B-time_A$, then you could likely use $y$ as a dependent variable in linear regression, providing the residual values $e_i=y_i-\hat{y}_i$ derived from results are normally-distributed, where $\hat{y}_i$ are the predicted values of $y$.
If you are modelling the time between events, this can be thought of as being exponentially distributed, i.e a Poisson distribution can be thought of as being the number of events, while the exponential as the time between these events, https://en.wikipedia.org/wiki/Exponential_distribution. Based on this, $y=time_B−time_A$ probably follows an Exponential distribution.


text:
Contents

# Contents

## Idea

In type theory, type checking refers to the problem whether the judgment $\Gamma\vdash a \colon A$ is derivable in a given type theory.

## Properties

### Decidability

For instance, intensional type theory has decidable type checking, but extensional type theory, which adds the rule of equality reflection, does not. For an exposition of this result, see Hofmann 1995.

In more expressive type theories, we can also ask whether judgmental equality (also called computational or definitional equality) is decidable. Since deciding the judgmental equality is often a prerequisite for deciding type checking, systems with decidable type checking often have decidable judgmental equality.

## References

• Martin Hofmann, Extensional concepts in intensional type theory, Ph.D. dissertation, University of Edinburgh (1995). (link)


text:
How do you find the vertex and the intercepts for f(x) = -x^2 + 8x + 2?

Apr 9, 2017

Vertex: $\left(4 , 18\right)$
Y-intercept: $\left(0 , 2\right)$
X-interecpt: $\left(4 + 3 \sqrt{2} , 0\right)$ and $\left(4 - 3 \sqrt{2} , 0\right)$

Explanation:

The vertex is pretty easy. We just need to complete the square .

First, the leading coefficient of the polynomial must be $1$, so we need to factor the $- 1$. That leaves us with $y = - 1 \left({x}^{2} - 8 x - 2\right)$. Now, the purpose of completing the square is to find a constant that makes ${x}^{2} - 8 x$ a perfect square. To that, we use this formula: $c = {\left(\frac{1}{2} \cdot b\right)}^{2}$ or ${\left(\frac{1}{2} \cdot 8\right)}^{2}$, which is $16$.

Now we know that we have to add $16$ to make it a pefect square, but because we cannot just add something on one side of the equation, we need to "get rid of it" too. We could add $16$ on both sides, or we can just add $16$ and then subtract it immediately, which is the same thing. Either way works :)
$y = - 1 \left({x}^{2} - 8 x \textcolor{g r e e n}{+ 16 - 16} - 2\right)$
$y = - \left(\left({x}^{2} - 8 x + 16\right) - 16 - - 2\right)$

${x}^{2} - 8 x + 16$ is a perfect square, so let's symplify it

$y = - \left({\left(x - 4\right)}^{2} - 16 - 2\right)$
$y = - \left({\left(x - 4\right)}^{2} - 18\right)$

Now we just distribute the negative:
$y = - {\left(x - 4\right)}^{2} + 18$

The equation is now in vertex form.

It's easy to find the vertex from this point:
$y = - {\left(x - \textcolor{red}{4}\right)}^{2} + \textcolor{p u r p \le}{18}$
$\left(\textcolor{red}{4} , \textcolor{p u r p \le}{18}\right)$.

Finding the $x$-interecpt means setting $y = 0$ and solving for $x$:

$0 = - {\left(x - 4\right)}^{2} + 18$
$- 18 = - {\left(x - 4\right)}^{2}$
$18 = {\left(x - 4\right)}^{2}$
$\pm \sqrt{18} = x - 4$
$4 \pm \sqrt{18} = x$
or $x = 4 \pm 3 \sqrt{2}$

Those are the exact values. If you want the estimated values, they're $x \approx 8.243$ and $x \approx - .0 .243$

To find the $y$-intercept we just set $x = 0$ and solve for $y$:
$y = - {\left(0 - 4\right)}^{2} + 18$
$y = - {\left(- 4\right)}^{2} + 18$
$y = - 16 + 18$
$y = 2$


text:
Create and Evaluate Polynomials

This example shows how to represent a polynomial as a vector in MATLAB® and evaluate the polynomial at points of interest.

Representing Polynomials

MATLAB® represents polynomials as row vectors containing coefficients ordered by descending powers. For example, the three-element vector

` p = [p2 p1 p0];`

represents the polynomial

`$p\left(x\right)={p}_{2}{x}^{2}+{p}_{1}x+{p}_{0}.$`

Create a vector to represent the quadratic polynomial $p\left(x\right)={x}^{2}-4x+4$.

`p = [1 -4 4];`

Intermediate terms of the polynomial that have a coefficient of `0` must also be entered into the vector, since the `0` acts as a placeholder for that particular power of `x`.

Create a vector to represent the polynomial $p\left(x\right)=4{x}^{5}-3{x}^{2}+2x+33$.

`p = [4 0 0 -3 2 33];`

Evaluating Polynomials

After entering the polynomial into MATLAB® as a vector, use the `polyval` function to evaluate the polynomial at a specific value.

Use `polyval` to evaluate $p\left(2\right)$.

`polyval(p,2)`
```ans = 153 ```

Alternatively, you can evaluate a polynomial in a matrix sense using `polyvalm`. The polynomial expression in one variable, $p\left(x\right)=4{x}^{5}-3{x}^{2}+2x+33$, becomes the matrix expression

`$p\left(X\right)=4{X}^{5}-3{X}^{2}+2X+33I,$`

where `X` is a square matrix and `I` is the identity matrix.

Create a square matrix, `X`, and evaluate `p` at `X`.

```X = [2 4 5; -1 0 3; 7 1 5]; Y = polyvalm(p,X)```
```Y = 3×3 154392 78561 193065 49001 24104 59692 215378 111419 269614 ```


text:
Share

# Let F(X) = 2x3 − 3x2 − 12x + 5 on [ 2, 4]. the Relative Maximum Occurs at X = (A) − 2 (B) − 1 (C) 2 (D) 4 - Mathematics

#### Question

Let f(x) = 2x3$-$ 3x2$-$ 12x + 5 on [ 2, 4]. The relative maximum occurs at x = ______________ .

• -2

• -1

• 2

• 4

#### Solution

2

$\text { Given }: f\left( x \right) = 2 x^3 - 3 x^2 - 12x + 5$

$\Rightarrow f'\left( x \right) = 6 x^2 - 6x - 12$

$\text { For a local maxima or a local minima, we must have }$

$f'\left( x \right) = 0$

$\Rightarrow 6 x^2 - 6x - 12 = 0$

$\Rightarrow x^2 - x - 2 = 0$

$\Rightarrow \left( x - 2 \right)\left( x + 1 \right) = 0$

$\Rightarrow x = 2, - 1$

$\text{ Now, }$

$f''\left( x \right) = 12x - 6$

$\Rightarrow f''\left( - 1 \right) = - 12 - 6 = - 18 < 0$

$\text { So, x = 1 is a local maxima } .$

$\text { Also },$

$f''\left( 2 \right) = 24 - 6 = 18 > 0$

$\text { So, x = 2 is a local minima } .$

Is there an error in this question or solution?


text:
Set caption value in a flextable. The function can also be used to define formattings that will be applied if possible to Word and HTML outputs.

• The caption will be associated with a paragraph style when the output is Word. It can also be numbered as a auto-numbered Word computed value.

• The PowerPoint format ignores captions. PowerPoint documents are not structured and do not behave as HTML documents and paginated documents (word, pdf), and it's not possible to know where we should create a shape to contain the caption (technically it can't be in the PowerPoint shape containing the table).

When working with 'R Markdown' or 'Quarto', the caption settings defined with set_caption() will be prioritized over knitr chunk options.

Caption value can be a single string or the result to a call to as_paragraph(). With the latter, the caption is made of formatted chunks whereas with the former, caption will not be associated with any formatting.

set_caption(
x,
caption = NULL,
autonum = NULL,
word_stylename = "Table Caption",
style = word_stylename,
fp_p = NULL,
align_with_table = TRUE,
html_classes = NULL,
html_escape = TRUE
)

## Arguments

x

flextable object

caption

caption value. The caption can be either a string either a call to as_paragraph(). In the latter case, users are free to format the caption with colors, italic fonts, also mixed with images or equations. Note that Quarto does not allow the use of this feature.

Caption as a string does not support 'Markdown' syntax. If you want to add a bold text in the caption, use as_paragraph('a ', as_b('bold'), ' text') when providing caption.

autonum

an autonum representation. See officer::run_autonum(). This has an effect only when the output is "Word" (in which case the object is used to define the Word auto-numbering), "html" and "pdf" (in which case only the bookmark identifier will be used). If used, the caption is preceded by an auto-number sequence.

word_stylename, style

'Word' style name to associate with caption paragraph. These names are available with function officer::styles_info() when output is Word. Argument style is deprecated in favor of word_stylename. If the caption is defined with as_paragraph(), some of the formattings of the paragraph style will be replaced by the formattings associated with the chunks (such as the font).

fp_p

paragraph formatting properties associated with the caption, see fp_par(). It applies when possible, i.e. in HTML and 'Word' but not with bookdown.

align_with_table

if TRUE, caption is aligned as the flextable, if FALSE, fp_p will not be updated and alignement is as defined with fp_p. It applies when possible, i.e. in HTML and 'Word' but not with bookdown.

html_classes

css class(es) to apply to associate with caption paragraph when output is 'Word'.

html_escape

should HTML entities be escaped so that it can be safely included as text or an attribute value within an HTML document.

## Details

The values defined by set_caption() will be preferred when possible, i.e. the caption ID, the associated paragraph style, etc. Why specify "where possible"? Because the principles differ from tool to tool. Here is what we have noticed and tried to respect (if you think we are wrong, let us know):

• Word and HTML documents made with 'rmarkdown', i.e. with rmarkdown::word_document() and rmarkdown::html_document() are not supposed to have numbered and cross-referenced captions.

• PDF documents made with 'rmarkdown' rmarkdown::pdf_document() automatically add numbers before the caption.

• Word and HTML documents made with 'bookdown' are supposed to have numbered and cross-referenced captions. This is achieved by 'bookdown' but for technical reasons, the caption must not be defined in an HTML or XML block. So with flextable we lose the ability to format the caption content; surprisingly this is not the case with PDF.

• HTML and PDF documents created with Quarto will manage captions and cross-references differently; Quarto will replace captions with tbl-cap and label values.

• Word documents made with Quarto are another specific case, Quarto does not inject captions from the tbl-cap and label values. This is a temporary situation that should evolve later. flextable' will evolve according to the evolution of Quarto.

Using body_add_flextable() enable all options specified with set_caption().

## R Markdown

flextable captions can be defined from R Markdown documents by using knitr::opts_chunk\$set(). User don't always have to call set_caption() to set a caption, he can use knitr chunk options instead. A typical call would be:

{r}
#| tab.id: bookmark_id
#| tab.cap: caption text

tab.id is the caption id or bookmark, tab.cap is the caption text. There are many options that can replace set_caption() features. The following knitr chunk options are available:

 label name value Word stylename to use for table captions. tab.cap.style NULL caption id/bookmark tab.id NULL caption tab.cap NULL display table caption on top of the table or not tab.topcaption TRUE caption table sequence identifier. tab.lp "tab:" prefix for numbering chunk (default to "Table "). tab.cap.pre Table suffix for numbering chunk (default to ": "). tab.cap.sep " :" title number depth tab.cap.tnd 0 separator to use between title number and table number. tab.cap.tns "-" caption prefix formatting properties tab.cap.fp_text fp_text_lite(bold = TRUE)

See knit_print.flextable for more details.

## Formatting the caption

You can build your caption with as_paragraph(). This is recommended if your captions need complex content. The caption is build with a paragraph made of chunks (for example, a red bold text + Arial italic text).

The user will then have the ability to format text and to add images and equations. If no format is specified (using "a string" or as_chunk("a string")), fp_text_default() is used to define font settings (font family, bold, italic, color, etc...). The default values can be changed with set_flextable_defaults(). It is recommended to explicitly use as_chunk().

The counterpart is that the style properties of the caption will not take precedence over those of the formatted elements. You will have to specify the font to use:

set_caption(
as_paragraph(
as_chunk("caption", props = fp_text_default(font.family = "Cambria"))
), word_stylename = "Table Caption")
print(ftab, preview = "docx")

## Using 'Quarto'

'Quarto' manage captions and cross-references instead of flextable. That's why set_caption() is not that useful in a 'Quarto' document except for Word documents where 'Quarto' does not manage captions yet (when output is raw xml which is the case for flextable).

knitr options are almost the same than those detailled in the R Markdown section (see upper), but be aware that 'Quarto' manage captions and it can be overwrite what has been defined by flextable. See Quarto documentation for more information.

## Examples

ftab <- flextable( head( iris ) )
ftab <- set_caption(ftab, "my caption")
ftab
#> a flextable object.
#> col_keys: Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species
#> body has 6 row(s)
#> original dataset sample:
#>   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1          5.1         3.5          1.4         0.2  setosa
#> 2          4.9         3.0          1.4         0.2  setosa
#> 3          4.7         3.2          1.3         0.2  setosa
#> 4          4.6         3.1          1.5         0.2  setosa
#> 5          5.0         3.6          1.4         0.2  setosa

autonum <- run_autonum(seq_id = "tab", bkm = "mtcars")
ftab <- flextable( head( mtcars ) )
ftab <- set_caption(ftab, caption = "mtcars data", autonum = autonum)
ftab
#> a flextable object.
#> col_keys: mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb`


text:
# nLab complex geometry

complex geometry

### Examples

#### Analytic geometry

analytic geometry (complex, rigid, global)

## Basic concepts

analytic function

analytification

## Theorems

GAGA

#### Differential geometry

differential geometry

synthetic differential geometry

# Contents

## Idea

In complex geometry one studies complex manifolds as a special case of how in general differential geometry one studies more generally smooth manifolds.

In complex analytic geometry one studies, more generally, complex analytic spaces.

## Properties

### GAGA principle and relation to algebraic geometry

complex analytic geometry is closely related to algebraic geometry over the complex numbers. See at GAGA for more on this.

## References

• Daniel Huybrechts Complex geometry - an introduction. Springer (2004). Universitext. 309 pages. (pdf)

Revised on August 10, 2014 06:29:13 by Urs Schreiber (185.37.147.14)