text:
# How to suppress printing statments in function call

I defined a function in Mathematica using Module similar to

function[a0_,b0_]:=Module[{a, b},
a=a0;
b=b0;
subFunction[a,b];
...
]

Both function and subFunction (and possible subSubFunctions) contain Print[] statements.

My question: How can I call function[] and at the same time suppress all Print[] statements. I don't want to get the output of these Print[] statements. This should be done without changing the definitions of the functions.

• Function is a builtin symbol. You can't name your own function Function. Generally, try not to start your own functions with capital letters to avoid such conflicts. (I know that it was just an example.) – Szabolcs Oct 3 '17 at 8:45
• Thanks for the advice and editing of my post! – Jann Oct 3 '17 at 8:49
• This question is similar to stackoverflow.com/questions/8698754/… In addition to the answer given below, try using the On, Off, Message idiom. I think some built-in functions have symbol::verbose defined that you can turn On in order to see some internal progress messages. – masterxilo Oct 3 '17 at 23:38

You can use

Block[{Print},
function[]
]

A better solution is not to use Print. A common debugging technique is to use a myPrint function instead of Print for printing debugging messages. If this function is not defined, it's as if it weren't there. Nothing will be printed. If you want to turn on debugging, then just myPrint = Print. If you want to turn on debugging only temporarily, then Block[{myPrint = Print}, function[]].

Don't forget that Mathematica as a built-in debugger.

• Thank you very much! That was exactly what I was looking for. The Print statements I used were not meant for debugging but rather for expressing what function is doing. However I am not interested in these details when calling function several times just for getting the desired output. – Jann Oct 3 '17 at 8:55
• @goe, as a suggestion for future development: you might want to implement your future functions to have an option (or optional argument) that would allow you to switch between simple and verbose modes, so that you won't have to resort to trickery like this. – J. M.'s technical difficulties Oct 3 '17 at 14:06


text:
# Precalculus : Find the Product of a Vector and a Scalar

## Example Questions

### Example Question #91 : Matrices And Vectors

Find the product of the vector  and scalar .

Explanation:

When multiplying a vector by a scalar we multiply each component of the vector by the scalar and the result is a vector:

### Example Question #94 : Matrices And Vectors

Find the vector given by the product:

Explanation:

Given a scalar k and a vector v, the vector given by their products is defined component-wise:

.

Here, our product is:

### Example Question #1 : Find The Product Of A Vector And A Scalar

This question refers to the previous question.

Simplify.

Explanation:

In order to simplify this problem we need to multiply the scalar factor to each component of the vector.

In our case the scalar factor is

Thus,

### Example Question #761 : Pre Calculus

Evaluate:

Explanation:

In order to determine the final value of the vector, distribute the scalar among each term in the vector.

### Example Question #2 : Find The Product Of A Vector And A Scalar

If the vector from  to  was multiplied by a scale factor of 3, what is the new vector ?

Explanation:

To find :

Subtract vector  from .

Multiply this vector by a scale of 3.

### Example Question #21 : Geometric Vectors

Find the product of:

Explanation:

When a scalar is multiplied to a vector, simply distribute that value for both terms in the vector.

### Example Question #21 : Geometric Vectors

When given a vector  and a scalar  what happens to the length and angle of  when multiplied with ?

or the length of the product is the same as the original vector.

The angle is multiplied by .

or the length of the product is  times as long as the original vector.

The angle is multiplied by .

or the length of the product is the same as the original vector.

The angle is unchanged

or the length of the product is  times the length of the original vector.

The angle is multiplied by

or the length of the product is  times the length of the original vector.

The angle is unchanged.

or the length of the product is  times the length of the original vector.

The angle is unchanged.

Explanation:

In simple terms  is the hypotenuse of a triangle formed by the components of . So when you multiply  by  it mupltiplies all the componets by . This makes the length of the hypotensuse grow by  as demonstrated by  from the Pythagorean Theorem.

For the same reasons the angle does not change because the new longer triangle will be a similar triangle to the original triangle.

### Example Question #23 : Geometric Vectors

Determine the product:

format: plain


text:
# zbMATH — the first resource for mathematics

$$A$$-harmonic equations and the Dirac operator. (English) Zbl 1207.35144
Summary: We show how $$A$$-harmonic equations arise as components of Dirac systems. We generalize $$A$$-harmonic equations to $$A$$-Dirac equations. Removability theorems are proved for solutions to $$A$$-Dirac equations.

##### MSC:
 35J60 Nonlinear elliptic equations 35Q40 PDEs in connection with quantum mechanics 30G30 Other generalizations of analytic functions (including abstract-valued functions) 35B45 A priori estimates in context of PDEs
Full Text:
##### References:
 [1] Abreu-Blaya, R; Bory-Reyes, J; Peña-Peña, D, Jump problem and removable singularities for monogenic functions, The Journal of Geometric Analysis, 17, 1-13, (2007) · Zbl 1211.30056 [2] Chen, Q; Jost, J; Li, J; Wang, G, Dirac-harmonic maps, Mathematische Zeitschrift, 254, 409-432, (2006) · Zbl 1103.53033 [3] Chen, Q; Jost, J; Li, J; Wang, G, Regularity theorems and energy identities for Dirac-harmonic maps, Mathematische Zeitschrift, 251, 61-84, (2005) · Zbl 1091.53042 [4] Chen, Q; Jost, J; Wang, G, Nonlinear Dirac equations on Riemann surfaces, Annals of Global Analysis and Geometry, 33, 253-270, (2008) · Zbl 1141.58011 [5] Wang C: A remark on nonlinear Dirac equations. preprint preprint · Zbl 0845.35015 [6] Wang C, Xu D: Regularity of Dirac-harmonic maps. International Mathematics Research Notices 2009, (20):3759-3792. · Zbl 1182.58007 [7] Heinonen J, Kilpeläinen T, Martio O: Nonlinear Potential Theory of Degenerate Elliptic Equations, Oxford Mathematical Monographs. Oxford University Press, New York, NY, USA; 1993:vi+363. · Zbl 0780.31001 [8] Nolder, CA; Ryan, J, Dirac operators, Advances in Applied Clifford Algebra, 19, 391-402, (2009) · Zbl 1170.53028 [9] Nolder CA: Nonlinear -Dirac equations. to appear in Advances in Applied Clifford Algebra to appear in Advances in Applied Clifford Algebra · Zbl 1091.53042 [10] Kaufman, R; Wu, JM, Removable singularities for analytic or subharmonic functions, Arkiv för Matematik, 18, 107-116, (1980) · Zbl 0444.30002 [11] Koskela, P; Martio, O, Removability theorems for solutions of degenerate elliptic partial differential equations, Arkiv för Matematik, 31, 339-353, (1993) · Zbl 0845.35015 [12] Kilpeläinen, T; Zhong, X, Removable sets for continuous solutions of quasilinear elliptic equations, Proceedings of the American Mathematical Society, 130, 1681-1688, (2002) · Zbl 1027.35032 [13] Meyers, NG, Mean oscillation over cubes and Hölder continuity, Proceedings of the American Mathematical Society, 15, 717-721, (1964) · Zbl 0129.04002 [14] Langmeyer, N, The quasihyperbolic metric, growth, and John domains, Annales Academiæ Scientiarium Fennicæ. Mathematica, 23, 205-224, (1998) · Zbl 0904.30014 [15] Stein EM: Singular Integrals and Differentiability Properties of Functions, Princeton Mathematical Series, no. 30. Princeton University Press, Princeton, NJ, USA; 1970:xiv+290.
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Super Darboux-Egoroff equations and solutions

P.H.M. Kersten, Ruud Martini

Research output: Book/ReportReportProfessional

## Abstract

Super Darboux-Egoroff equations are discussed. First of all linearity of the potential $\varphi$ with respect to odd variables is proved. Solutions of Darboux-Egoroff equations in dimension $(2|2)$ including flatness of the unit vector field are constructed. Moreover solutions of Darboux-Egoroff equations in the presence of an Euler vector field are given. In dimension $(3|3)$ solutions of Darboux-Egoroff equations including flatness of unit and presence of Euler field are given.
Original language Undefined Enschede University of Twente, Department of Applied Mathematics 19 Published - 1998

### Publication series

Name Memorandum / Department of Applied Mathematics University of Twente, Department of Applied Mathematics 1472 0169-2690

## Keywords

• METIS-141323
• MSC-35G99
• MSC-35G25
• EWI-3292
• IR-65661


text:
# Properties

 Label 735.2.i.k Level 735 Weight 2 Character orbit 735.i Analytic conductor 5.869 Analytic rank 0 Dimension 4 CM no Inner twists 2

# Related objects

## Newspace parameters

 Level: $$N$$ = $$735 = 3 \cdot 5 \cdot 7^{2}$$ Weight: $$k$$ = $$2$$ Character orbit: $$[\chi]$$ = 735.i (of order $$3$$, degree $$2$$, not minimal)

## Newform invariants

 Self dual: no Analytic conductor: $$5.86900454856$$ Analytic rank: $$0$$ Dimension: $$4$$ Relative dimension: $$2$$ over $$\Q(\zeta_{3})$$ Coefficient field: $$\Q(\sqrt{-3}, \sqrt{5})$$ Coefficient ring: $$\Z[a_1, a_2, a_3]$$ Coefficient ring index: $$2^{2}$$ Twist minimal: no (minimal twist has level 105) Sato-Tate group: $\mathrm{SU}(2)[C_{3}]$

## $q$-expansion

Coefficients of the $$q$$-expansion are expressed in terms of a basis $$1,\beta_1,\beta_2,\beta_3$$ for the coefficient ring described below. We also show the integral $$q$$-expansion of the trace form.

 $$f(q)$$ $$=$$ $$q -\beta_{2} q^{2} -\beta_{1} q^{3} + 3 \beta_{1} q^{4} + ( 1 + \beta_{1} ) q^{5} + \beta_{3} q^{6} -\beta_{3} q^{8} + ( -1 - \beta_{1} ) q^{9} +O(q^{10})$$ $$q -\beta_{2} q^{2} -\beta_{1} q^{3} + 3 \beta_{1} q^{4} + ( 1 + \beta_{1} ) q^{5} + \beta_{3} q^{6} -\beta_{3} q^{8} + ( -1 - \beta_{1} ) q^{9} + ( -\beta_{2} - \beta_{3} ) q^{10} + ( 2 \beta_{1} - 2 \beta_{2} - 2 \beta_{3} ) q^{11} + ( 3 + 3 \beta_{1} ) q^{12} + 2 \beta_{3} q^{13} + q^{15} + ( 1 + \beta_{1} ) q^{16} -2 \beta_{1} q^{17} + ( \beta_{2} + \beta_{3} ) q^{18} + ( -2 - 2 \beta_{1} - 2 \beta_{2} ) q^{19} -3 q^{20} + ( -10 - 2 \beta_{3} ) q^{22} + ( -4 - 4 \beta_{1} ) q^{23} + ( -\beta_{2} - \beta_{3} ) q^{24} + \beta_{1} q^{25} + ( 10 + 10 \beta_{1} ) q^{26} - q^{27} -2 q^{29} -\beta_{2} q^{30} + ( 6 \beta_{1} + 2 \beta_{2} + 2 \beta_{3} ) q^{31} + ( -3 \beta_{2} - 3 \beta_{3} ) q^{32} + ( 2 + 2 \beta_{1} - 2 \beta_{2} ) q^{33} + 2 \beta_{3} q^{34} + 3 q^{36} + ( -2 - 2 \beta_{1} - 4 \beta_{2} ) q^{37} + ( 10 \beta_{1} + 2 \beta_{2} + 2 \beta_{3} ) q^{38} + ( 2 \beta_{2} + 2 \beta_{3} ) q^{39} + \beta_{2} q^{40} -2 q^{41} + 4 \beta_{3} q^{43} + ( -6 - 6 \beta_{1} + 6 \beta_{2} ) q^{44} -\beta_{1} q^{45} + ( 4 \beta_{2} + 4 \beta_{3} ) q^{46} + ( -4 - 4 \beta_{1} + 4 \beta_{2} ) q^{47} + q^{48} -\beta_{3} q^{50} + ( -2 - 2 \beta_{1} ) q^{51} + ( -6 \beta_{2} - 6 \beta_{3} ) q^{52} + ( -8 \beta_{1} - 2 \beta_{2} - 2 \beta_{3} ) q^{53} + \beta_{2} q^{54} + ( -2 - 2 \beta_{3} ) q^{55} + ( -2 + 2 \beta_{3} ) q^{57} + 2 \beta_{2} q^{58} + ( 4 \beta_{2} + 4 \beta_{3} ) q^{59} + 3 \beta_{1} q^{60} + ( 2 + 2 \beta_{1} ) q^{61} + ( 10 - 6 \beta_{3} ) q^{62} -13 q^{64} -2 \beta_{2} q^{65} + ( 10 \beta_{1} - 2 \beta_{2} - 2 \beta_{3} ) q^{66} -4 \beta_{1} q^{67} + ( 6 + 6 \beta_{1} ) q^{68} -4 q^{69} + ( 10 - 2 \beta_{3} ) q^{71} -\beta_{2} q^{72} + ( -8 \beta_{1} + 2 \beta_{2} + 2 \beta_{3} ) q^{73} + ( 20 \beta_{1} + 2 \beta_{2} + 2 \beta_{3} ) q^{74} + ( 1 + \beta_{1} ) q^{75} + ( 6 - 6 \beta_{3} ) q^{76} + 10 q^{78} + ( -4 - 4 \beta_{1} + 4 \beta_{2} ) q^{79} + \beta_{1} q^{80} + \beta_{1} q^{81} + 2 \beta_{2} q^{82} + ( -8 - 4 \beta_{3} ) q^{83} + 2 q^{85} + ( 20 + 20 \beta_{1} ) q^{86} + 2 \beta_{1} q^{87} + ( -10 \beta_{1} + 2 \beta_{2} + 2 \beta_{3} ) q^{88} + ( 2 + 2 \beta_{1} ) q^{89} + \beta_{3} q^{90} + 12 q^{92} + ( 6 + 6 \beta_{1} + 2 \beta_{2} ) q^{93} + ( -20 \beta_{1} + 4 \beta_{2} + 4 \beta_{3} ) q^{94} + ( -2 \beta_{1} - 2 \beta_{2} - 2 \beta_{3} ) q^{95} -3 \beta_{2} q^{96} + ( 4 + 2 \beta_{3} ) q^{97} + ( 2 + 2 \beta_{3} ) q^{99} +O(q^{100})$$ $$\operatorname{Tr}(f)(q)$$ $$=$$ $$4q + 2q^{3} - 6q^{4} + 2q^{5} - 2q^{9} + O(q^{10})$$ $$4q + 2q^{3} - 6q^{4} + 2q^{5} - 2q^{9} - 4q^{11} + 6q^{12} + 4q^{15} + 2q^{16} + 4q^{17} - 4q^{19} - 12q^{20} - 40q^{22} - 8q^{23} - 2q^{25} + 20q^{26} - 4q^{27} - 8q^{29} - 12q^{31} + 4q^{33} + 12q^{36} - 4q^{37} - 20q^{38} - 8q^{41} - 12q^{44} + 2q^{45} - 8q^{47} + 4q^{48} - 4q^{51} + 16q^{53} - 8q^{55} - 8q^{57} - 6q^{60} + 4q^{61} + 40q^{62} - 52q^{64} - 20q^{66} + 8q^{67} + 12q^{68} - 16q^{69} + 40q^{71} + 16q^{73} - 40q^{74} + 2q^{75} + 24q^{76} + 40q^{78} - 8q^{79} - 2q^{80} - 2q^{81} - 32q^{83} + 8q^{85} + 40q^{86} - 4q^{87} + 20q^{88} + 4q^{89} + 48q^{92} + 12q^{93} + 40q^{94} + 4q^{95} + 16q^{97} + 8q^{99} + O(q^{100})$$

Basis of coefficient ring in terms of a root $$\nu$$ of $$x^{4} - x^{3} + 2 x^{2} + x + 1$$:

 $$\beta_{0}$$ $$=$$ $$1$$ $$\beta_{1}$$ $$=$$ $$($$$$-\nu^{3} + 2 \nu^{2} - 2 \nu - 1$$$$)/2$$ $$\beta_{2}$$ $$=$$ $$($$$$\nu^{3} - 2 \nu^{2} + 6 \nu - 1$$$$)/2$$ $$\beta_{3}$$ $$=$$ $$\nu^{3} + 2$$
 $$1$$ $$=$$ $$\beta_0$$ $$\nu$$ $$=$$ $$($$$$\beta_{2} + \beta_{1} + 1$$$$)/2$$ $$\nu^{2}$$ $$=$$ $$($$$$\beta_{3} + \beta_{2} + 3 \beta_{1}$$$$)/2$$ $$\nu^{3}$$ $$=$$ $$\beta_{3} - 2$$

## Character values

We give the values of $$\chi$$ on generators for $$\left(\mathbb{Z}/735\mathbb{Z}\right)^\times$$.

 $$n$$ $$346$$ $$442$$ $$491$$ $$\chi(n)$$ $$-1 - \beta_{1}$$ $$1$$ $$1$$

## Embeddings

For each embedding $$\iota_m$$ of the coefficient field, the values $$\iota_m(a_n)$$ are shown below.

For more information on an embedded modular form you can click on its label.

Label $$\iota_m(\nu)$$ $$a_{2}$$ $$a_{3}$$ $$a_{4}$$ $$a_{5}$$ $$a_{6}$$ $$a_{7}$$ $$a_{8}$$ $$a_{9}$$ $$a_{10}$$
226.1
 0.809017 − 1.40126i −0.309017 + 0.535233i 0.809017 + 1.40126i −0.309017 − 0.535233i
−1.11803 + 1.93649i 0.500000 + 0.866025i −1.50000 2.59808i 0.500000 0.866025i −2.23607 0 2.23607 −0.500000 + 0.866025i 1.11803 + 1.93649i
226.2 1.11803 1.93649i 0.500000 + 0.866025i −1.50000 2.59808i 0.500000 0.866025i 2.23607 0 −2.23607 −0.500000 + 0.866025i −1.11803 1.93649i
361.1 −1.11803 1.93649i 0.500000 0.866025i −1.50000 + 2.59808i 0.500000 + 0.866025i −2.23607 0 2.23607 −0.500000 0.866025i 1.11803 1.93649i
361.2 1.11803 + 1.93649i 0.500000 0.866025i −1.50000 + 2.59808i 0.500000 + 0.866025i 2.23607 0 −2.23607 −0.500000 0.866025i −1.11803 + 1.93649i
 $$n$$: e.g. 2-40 or 990-1000 Significant digits: Format: Complex embeddings Normalized embeddings Satake parameters Satake angles

## Inner twists

Char Parity Ord Mult Type
1.a even 1 1 trivial
7.c even 3 1 inner

## Twists

By twisting character orbit
Char Parity Ord Mult Type Twist Min Dim
1.a even 1 1 trivial 735.2.i.k 4
7.b odd 2 1 735.2.i.i 4
7.c even 3 1 105.2.a.b 2
7.c even 3 1 inner 735.2.i.k 4
7.d odd 6 1 735.2.a.k 2
7.d odd 6 1 735.2.i.i 4
21.g even 6 1 2205.2.a.w 2
21.h odd 6 1 315.2.a.d 2
28.g odd 6 1 1680.2.a.v 2
35.i odd 6 1 3675.2.a.y 2
35.j even 6 1 525.2.a.g 2
35.l odd 12 2 525.2.d.c 4
56.k odd 6 1 6720.2.a.cs 2
56.p even 6 1 6720.2.a.cx 2
84.n even 6 1 5040.2.a.bw 2
105.o odd 6 1 1575.2.a.r 2
105.x even 12 2 1575.2.d.d 4
140.p odd 6 1 8400.2.a.cx 2

By twisted newform orbit
Twist Min Dim Char Parity Ord Mult Type
105.2.a.b 2 7.c even 3 1
315.2.a.d 2 21.h odd 6 1
525.2.a.g 2 35.j even 6 1
525.2.d.c 4 35.l odd 12 2
735.2.a.k 2 7.d odd 6 1
735.2.i.i 4 7.b odd 2 1
735.2.i.i 4 7.d odd 6 1
735.2.i.k 4 1.a even 1 1 trivial
735.2.i.k 4 7.c even 3 1 inner
1575.2.a.r 2 105.o odd 6 1
1575.2.d.d 4 105.x even 12 2
1680.2.a.v 2 28.g odd 6 1
2205.2.a.w 2 21.g even 6 1
3675.2.a.y 2 35.i odd 6 1
5040.2.a.bw 2 84.n even 6 1
6720.2.a.cs 2 56.k odd 6 1
6720.2.a.cx 2 56.p even 6 1
8400.2.a.cx 2 140.p odd 6 1

## Hecke kernels

This newform subspace can be constructed as the intersection of the kernels of the following linear operators acting on $$S_{2}^{\mathrm{new}}(735, [\chi])$$:

 $$T_{2}^{4} + 5 T_{2}^{2} + 25$$ $$T_{13}^{2} - 20$$ $$T_{17}^{2} - 2 T_{17} + 4$$

## Hecke Characteristic Polynomials

$p$ $F_p(T)$
$2$ $$( 1 - 3 T + 5 T^{2} - 6 T^{3} + 4 T^{4} )( 1 + 3 T + 5 T^{2} + 6 T^{3} + 4 T^{4} )$$
$3$ $$( 1 - T + T^{2} )^{2}$$
$5$ $$( 1 - T + T^{2} )^{2}$$
$7$ 1
$11$ $$1 + 4 T + 10 T^{2} - 64 T^{3} - 261 T^{4} - 704 T^{5} + 1210 T^{6} + 5324 T^{7} + 14641 T^{8}$$
$13$ $$( 1 + 6 T^{2} + 169 T^{4} )^{2}$$
$17$ $$( 1 - 2 T - 13 T^{2} - 34 T^{3} + 289 T^{4} )^{2}$$
$19$ $$1 + 4 T - 6 T^{2} - 64 T^{3} - 181 T^{4} - 1216 T^{5} - 2166 T^{6} + 27436 T^{7} + 130321 T^{8}$$
$23$ $$( 1 + 4 T - 7 T^{2} + 92 T^{3} + 529 T^{4} )^{2}$$
$29$ $$( 1 + 2 T + 29 T^{2} )^{4}$$
$31$ $$1 + 12 T + 66 T^{2} + 192 T^{3} + 659 T^{4} + 5952 T^{5} + 63426 T^{6} + 357492 T^{7} + 923521 T^{8}$$
$37$ $$1 + 4 T + 18 T^{2} - 304 T^{3} - 1957 T^{4} - 11248 T^{5} + 24642 T^{6} + 202612 T^{7} + 1874161 T^{8}$$
$41$ $$( 1 + 2 T + 41 T^{2} )^{4}$$
$43$ $$( 1 + 6 T^{2} + 1849 T^{4} )^{2}$$
$47$ $$1 + 8 T + 34 T^{2} - 512 T^{3} - 4317 T^{4} - 24064 T^{5} + 75106 T^{6} + 830584 T^{7} + 4879681 T^{8}$$
$53$ $$1 - 16 T + 106 T^{2} - 704 T^{3} + 6123 T^{4} - 37312 T^{5} + 297754 T^{6} - 2382032 T^{7} + 7890481 T^{8}$$
$59$ $$1 - 38 T^{2} - 2037 T^{4} - 132278 T^{6} + 12117361 T^{8}$$
$61$ $$( 1 - 2 T - 57 T^{2} - 122 T^{3} + 3721 T^{4} )^{2}$$
$67$ $$( 1 - 4 T - 51 T^{2} - 268 T^{3} + 4489 T^{4} )^{2}$$
$71$ $$( 1 - 20 T + 222 T^{2} - 1420 T^{3} + 5041 T^{4} )^{2}$$
$73$ $$1 - 16 T + 66 T^{2} - 704 T^{3} + 12083 T^{4} - 51392 T^{5} + 351714 T^{6} - 6224272 T^{7} + 28398241 T^{8}$$
$79$ $$1 + 8 T - 30 T^{2} - 512 T^{3} - 2461 T^{4} - 40448 T^{5} - 187230 T^{6} + 3944312 T^{7} + 38950081 T^{8}$$
$83$ $$( 1 + 16 T + 150 T^{2} + 1328 T^{3} + 6889 T^{4} )^{2}$$
$89$ $$( 1 - 2 T - 85 T^{2} - 178 T^{3} + 7921 T^{4} )^{2}$$
$97$ $$( 1 - 8 T + 190 T^{2} - 776 T^{3} + 9409 T^{4} )^{2}$$


text:
Rating changes for the last round are temporarily rolled back. They will be returned soon. ×

### Sereja's blog

By Sereja, 9 years ago, translation,

Hello everybody!

Welcome all to Codeforces Round #131, which will be held on Monday, 30th of July at 19:30 MSK. I am (Sergey Nagin) an author of the problems. This will be my First Codeforces round and I hope it won't be the last one :).

I would like to thank Mike Mirzayanov(MikeMirzayanov) who made this contest possible, Roman Furko(Furko) and Gerald Agapov(Gerald) for helping to prepare this round and Maria Belova(Delinur) for the translation of problem statements into English. I hope that problems will be interesting for you.

Good luck!

Problems’ point values in Division 1 are 1000-1000-1500-2000-2500. Problems’ point values in Division 2 are 500-1000-2000-2000-2500.

I strongly recommend you to read ALL the problems.

The contest is over! Congratulations' to winners!

First division:
1 place: Egor
2 place: Petr
3 place: tourist
Second division:
1 place: antimatter
2 place: c175353
3 place: takaramono

I hope, that problems were interesting for you.

You can view tutorial.

Some personal information. This year I finished school and I will go to university. I study programming during almost five years. In addition to computer science, I like sports: powerlifting, arm wrestling and swimming.

• +220

 » 9 years ago, # |   +13 so, we are gonna have some sports flavored problems!!
•  » » 9 years ago, # ^ |   -7 And everyone is in the olympics mood too!!
 » 9 years ago, # |   +1 will the scoring be as usually or dynamic ?
•  » » 9 years ago, # ^ | ← Rev. 3 →   -15 Dynamic scoring is nearer and nearer to become 'usual & default' :)UPD: not this time :D
•  » » » 9 years ago, # ^ |   -11 Well usually when the contest only for DIV 2, it's using dynamic, and for both Division they usually use normal scorring IMO
•  » » » 9 years ago, # ^ | ← Rev. 2 →   +3 I disagree..If you browse thorough the contests after Round #113(after dynamic scoring was introduced) you will find that apart from rounds #115 and #126 and all rounds from the trio NALP- Gerald-HolkinPV (which have dynamic scoring systems) ,,the scoring system has been traditional in other rounds. So I think they leave it on the authors to decide ..
 » 9 years ago, # |   -18 Good Luck And Have Fun! :)
 » 9 years ago, # | ← Rev. 8 →   -13 hacked by hackers
•  » » 9 years ago, # ^ |   -7 What said bad(he has -4)?
•  » » » 9 years ago, # ^ |   +36 Don't try to understand negative votes on codeforces.
•  » » » » 9 years ago, # ^ |   -13 if comments have negative votes it is bad but lashabuxo-s comment i think is not bad.
•  » » » » » 9 years ago, # ^ |   -7 If comment have negative votes — then somebody thinks it is bad.
 » 9 years ago, # |   0 How to run my program at local machine? Above is quickly enough?g++ xx -o exe exe < in.txt
•  » » 9 years ago, # ^ |   +3 g++ code.cpp -O2 -o exe
•  » » 9 years ago, # ^ |   +1 g++ name.cpp && a.exe
 » 9 years ago, # |   +4 Very interesting B question in Div-2..It made me so involved that I did'nt have the time to read C,D,E..But I am happy I managed to pass th pretest finally after 11 WA..
•  » » 9 years ago, # ^ | ← Rev. 3 →   0 Some test example from Hacker. Input: 3 0 0 0 Output: 000 Answer:0
 » 9 years ago, # |   +72 how can This Submission Pass the preetest but got compile error while Systest ?
•  » » 9 years ago, # ^ |   +27 Compilation Error на 10-м тесте facepalm
•  » » 9 years ago, # ^ |   +1 How is that even possible?
 » 9 years ago, # |   +4 Great contest, thanks to all of you.
 » 9 years ago, # |   +15 It seems java needs more space than C++. In div1-C I initialize a 3-D array and get MLE.
•  » » 9 years ago, # ^ |   +13 I did not look at your code but it may be the case of how you declared the array.Arrays are objects in Java, so a[1000][1000][2] creates one million objects and a[2][1000][1000] creates only 2000. There is an overhead for each object.If space is an issue, use a 1D array instead.
 » 9 years ago, # |   +3 In the contest, I got many wrong answer on pretest 1 of problem D,.. After the contest, I found out the mistake, only one mistake: 10.0 => 1.0. And I got AC after fixing it... So sad!! :(
 » 9 years ago, # |   0 For div2 B, can someone confirm test 13 is the same with test 14, i.e. the input is ten thousand 0s? My solution passed 13 but failed on 14, quite weird.
•  » » 9 years ago, # ^ |   0 your solution didn't pass test 13. you got wrong answer on test 13.
•  » » » 9 years ago, # ^ | ← Rev. 2 →   0 The solution I meant is below, not the one during the contest.
•  » » » » 9 years ago, # ^ |   +8 test 13 and 14 are not identical. I suppose there is a difference between them and since we can't see the whole test case we can't see the difference.
•  » » 9 years ago, # ^ | ← Rev. 2 →   0 The wrong solution is here. Please give me some hints.
•  » » » 9 years ago, # ^ | ← Rev. 2 →   0 Input can be like this (100000) zero for test 13 (99999) zero + 1 for test 14 both of them have same answer but, because is too long, it will cut.
•  » » » 9 years ago, # ^ | ← Rev. 2 →   0 input 5 0 0 0 0 5 what answer?
•  » » » » 9 years ago, # ^ |   0 0
•  » » » 9 years ago, # ^ |   0 Thanks you guys who replied. I find the bug and get it fixed. This is the correct solution. It turns out case 13 and 14 are indeed different.
 » 9 years ago, # |   +6 very nice problem set!
 » 9 years ago, # |   +1 The problemsets are nice, thank you, Sereja.
 » 9 years ago, # |   0 Problem B was very confusing.. as in the problem statement, it was written: Each digit is allowed to occur in the number the same number of times it occurs in the set.Then how the ans for second test case is: 5554443330 since in input set 4 is occurring 4 times but in output integer it is occurring 3 times only.
•  » » 9 years ago, # ^ |   0 It is permitted to use not all digits from the set
•  » » 9 years ago, # ^ |   0 They said: " It is permitted to use not all digits from the set"
•  » » » 9 years ago, # ^ |   0 I took it as.. if i am not taking any digit then i am not supposed to use that digit in the output at all. Means that digit's count would be made 0. I tried other way also, but because of a very silly mistake my solution got hacked.
•  » » 9 years ago, # ^ |   +4 May be you missed this -> '**It is permitted to use not all digits from the set**'
 » 9 years ago, # |   +4 I Think It Would be better to increase Contest Time for some contests like this To let People have more Fun !
 » 9 years ago, # |   -21 The comment is hidden because of too negative feedback, click here to view it
•  » » 9 years ago, # ^ |   -9 It's interesting to see how many downvotes that comment will get, because it'll mean that some people actually care about comments that downvoted a lot.
•  » » 9 years ago, # ^ |   +15 One of the advantages of being Petr is that you can make such troll-jokes without throwing your reputation towards S = {x : x < 0} where x belongs to R.
•  » » 9 years ago, # ^ |   +7 When I try to click "here" the page scrolls to the top and the comment doesn't show up.
•  » » » 9 years ago, # ^ |   +1 I don't get how you don't get it. And I'm the "blue" one here.
 » 9 years ago, # |   +11 Does the intended solution for div1 E use hashes? I saw only hash solutions and wonder if they can be hacked using ideas from recent anti-hash articles.
•  » » 9 years ago, # ^ |   +13 I think that this is the reason why people submited this problem in last minutes of the competition — not to be hacked...
•  » » 9 years ago, # ^ | ← Rev. 3 →   +19 I'm quite sure it can be solved with something similar to KMP.Assume we can, after preprocessing, quickly compute functions prev(k, i) and next(k, i) for a permutation P, which give the first element j in [i, k — 1] preceding / succeeding k in P.Let suf[k] be the minimum j > 1 such that the part of A composed of elements [j, k] is (EDIT) the same permutation as the part of A composed of elements [1, k — j + 1]. We can compute suf[] using a linear number of calls to prev() and next() on A.Later we can use suf[] like a KMP table to compute all shifts that match with a linear number of calls to prev() and next() on A and B. :)
 » 9 years ago, # |   0 How can I know number of 1's in testcase number 12 in div2 problem B ?
•  » » 9 years ago, # ^ |   +8 There is no way to do this.But... You can count them, and guess counter by binary search. (For example, if cnt < 4000 then cause TLE, otherwise get WA)
•  » » » 9 years ago, # ^ |   +8 I found a better way compared to this. print out number of 1's for this particular case . number of 1's are 49898 . :D anyway thanks for your help.
 » 9 years ago, # | ← Rev. 2 →   +16 One Does Not Simply Update the rating quickly
 » 9 years ago, # |   +4 i am new on codeforces.com and how add friend???
•  » » 9 years ago, # ^ | ← Rev. 8 →   +1 hacked by hackers
•  » » 9 years ago, # ^ |   0 lashabuxo tell me why you made multiple accounts? http://codeforces.com/blog/entry/4924#comment-100414
•  » » » 9 years ago, # ^ |   0 i believe it's a way to get upvotes on his comments
•  » » » » 9 years ago, # ^ |   0 Is there any rational reason to do this? :P
•  » » » » » 9 years ago, # ^ |   0 don't ask me :)
•  » » 9 years ago, # ^ |   +5 open someone's page and click the star on the right of the name
 » 9 years ago, # |   -6 tourist lost his Codeforces Red Target :(
 » 9 years ago, # |   +1 When will the editorials be available for this contest's problemset? Thanks in advance
•  » » 9 years ago, # ^ |   -20 As soon as it gets posted.
 » 9 years ago, # |   -6 Wrong answer on test 65 on problem B, div 2. Don't you know what it is?
•  » » 9 years ago, # ^ |   +2 div 2,problem B: your submissions status and test 65:
 » 9 years ago, # |   0 when the Problem's Analysis will be placed ?
•  » » 9 years ago, # ^ |   0 Problem's Analysis already placed, but not at english language,link here
 » 9 years ago, # |   0 Although I liked the problems, I think problem C was a bit of a fiasco. On one hand the exact same problem has been given before in TopCoder, SPOJ, one Bulgarian competition (okay, no way to know that) and God knows where else. Thus many people had the chance to solve it in several minutes (I for one needed 9 minutes, and other people even less). Anyway, this happens (I know from bitter experience).I also was happy to see the negative numbers (which means negative results are possible). This is another TopCoder trick I've felt for before — if you use memoization and you initialize your array with -1 (which is valid number in this case) you have a correct, but possibly too slow solution. For those of you who don't know it — if the answer to the problem is -1, then some of the states will be calculated over and over again and it can turn really slow. So I was looking for such solutions in my room, however most were using standard iterative dp (which is okay with that) and didn't have the chance to challenge anyone.However, such a test was not present in the system tests, so some (possibly plenty) of wrong solutions passed.The test is rather simple to create: int n = 300; fprintf(stdout, "%d\n", n); for (int i = 0; i < n; i++) for (int c = 0; c < n; c++) fprintf(stdout, "%d%c", ((i + c == 580) ? -1 : 0), c + 1 == n ? '\n' : ' ');
•  » » 9 years ago, # ^ |   +1 But, is there a way to use a smaller state (not 598x300x300) so that you don't get memory limit exceeded? Because if that can't be done then I guess that could justify the absence of such cases
•  » » » 9 years ago, # ^ |   +5 Yes, sure. See my solution, it uses twice smaller state (if I initialize my dyn[][][] array with -INF instead of using additional array).
 » 9 years ago, # |   -13 Alrededor de mierda triste.
 » 9 years ago, # |   0 When I click the tutorial link, I can see a tutorial, but not in English. Why? The English tutorial has been released, I think.
•  » » 9 years ago, # ^ |   0 You may change '.ru' to '.com' in link. http://codeforces.com/blog/entry/4982
 » 9 years ago, # |   0 Hello! I don't know where to post my problem so i'll post it here. I apologize if posting this here is wrong.Well i have tried the problem Numbers(D div2, B div1) and i finally solved it. The source code is here http://codeforces.ru/contest/214/submission/1974583I get WA on test 10 (100 0 0 0 0 0 0 0 0 0 0). The strange thing is that when i run the code it prints the right answer on my computer. Here when i submit it, the answer on the same test is different and i don't get it why it does that.Please help me to see what is wrong :(
•  » » 9 years ago, # ^ |   0 In your code, len can be 0, so in Comb[len - 1][j] index goes -1 and so you get weird numbers from uninitialized memory, instead of expected 0 value.
•  » » » 9 years ago, # ^ |   0 Thank you very much :) I finally got AC. I guess i missed that -1 index.


text:
## Posts

Showing posts from June, 2010

### Differentiation of Trig functions Part II

Differentiation of trig functions using Chain rule, Product rule and Quotient rule

Example 1
Find

Technique: Use of Chain rule

Example 2
Given that , show that

Technique: use Quotient Rule

What's next ?
Check out other topics in Contents Page
Revise the basics of the differentiation of trig functions

### Differentiation and Integration of Trigonometric functions

A lot of students confuse the differentiation of trig functions with the integration of trig functions

The most effective way is to study them together

Remember that:

We can differentiate tan x but we cannot integrate tan x

Example 1
Find

Example 2

Note that

Example 3
Find

Example 4

Note that

### Surds, Log and Indices

An interesting question showing these 3 topics can be tested in a single question

Question

Express as

i) Hence show that

ii) Given that , prove that

Techniques tested

Rationalization Indices: Power Law:

Technique used: Rationalization

i)
Techniques used:
Indices:
Power Law:

From LHS

ii)

This part of the question requires us to use the Substitution technique

Recall that

therefore

Technique used: Taking log on both sides

Recall that in part (i) we showed that

Interesting question, dont you think ?

Have an interesting question to share? send me an email at yapye at (@) yahoo dot com dot sg

### Integration Techniques Part II

"Anti Chain Rule"

This isnt an official maths term. Just something to help students remember how this technique is applied

Recall the use of chain rule in differentiation

Differentiate with respect to x

Chain rule: "Bring down power, negate power by one multiply by the differentiation of the terms within the brackets"

Integration using "Anti Chain rule":
Increase power by one, divided by new power and the differentiation of the terms within the brackets"

Question 1

Note that there are some limitations to "anti chain rule" You cannot . "Anti chain rule" is ony possible with linear factors

Question 2

Integration as anti differentiation

In question 1,

when we differentiate y, we get

When we integrate , we get back

Question 3

Given that

a) Find

b) Hence evaluate

b)

### Integration techniques Part I

Integrating term by term

Formula:

where c is a constant

Example 1

Example 2

Example 3

Example 4


text:
## Introduction

Several lines of evidence indicate that different types of memory are served in parallel by distinct neural systems. The hippocampus is known to play a crucial role in declarative memory—remembering facts and events—and the striatum is in charge of gradual stimulus-response association or habit learning1,2,3,4,5. From the standpoint of reinforcement learning (RL) theory, the dorsolateral striatum has been proposed to mediate model-free RL (or incremental value learning based on experienced outcomes), whereas the hippocampus has been proposed to contribute to model-based RL (or knowledge-based value learning) based on its role in remembering facts and events and simulating hypothetical episodes6,7,8,9. As such, it is commonly assumed that the hippocampus is involved in learning facts and events, but not in gradual stimulus-response association or incremental value learning based on actually experienced outcomes.

We have shown previously that the CA1 region of the rat hippocampus conveys value signals in a dynamic foraging task that is well described by a model-free RL algorithm7. Surprisingly, CA1 value signals were as strong as value signals found in those brain areas that are thought to be involved in value-based decision making, such as the striatum and orbitofrontal cortex (OFC)10,11. These results are unexpected from the currently prevailing views on the neural underpinning of multiple memory systems1,2,3,4,5 and model-free versus model-based RL6,7,8,9,12. However, that the hippocampus processes value signals does not necessarily indicate its involvement in or requirement for value learning. In general, neural activity correlated with certain task variables does not warrant requirement of a given brain area for performing the task. For example, even though hippocampal neurons show strong responses to a conditional stimulus predicting an aversive event during a classical conditioning task13,14,15,16,17,18, hippocampal lesions do not impair performance in a conventional delay conditioning task19,20,21,22,23,24. Therefore, the hippocampus may represent value-related information in case for situations where model-based RL is required. Alternatively, contrary to the traditional view, the hippocampus may contribute to incremental value learning based on actually experience outcomes (i.e., model-free RL) under certain circumstances. In this study, to dissociate these possibilities, we examined effects of inactivating different hippocampal subregions on choice behavior of mice in a dynamic foraging task. We found that selective inactivation of CA1, but not dentate gyrus (DG), CA3, or CA2, impairs value learning without affecting value-dependent action selection. Our results indicate that the hippocampus, especially CA1, may contribute to incremental value learning in a dynamic foraging situation.

## Results

### Choice behavior

Mice harboring a CaMKIIa-Cre (n = 11), RGS14-Cre (n = 11), Grik4-Cre (n = 11), or Rbp4-Cre (n = 11) construct were used for selective inactivation of CA1, CA2, CA3, or DG, respectively. The mice were trained to perform a dynamic two-armed bandit (TAB) task in a modified T-maze (Fig. 1a). Water reward was delivered with different probabilities (72 versus 12%) at two target locations, and reward probabilities changed across four blocks of 140–180 trials without any sensory cues (Fig. 1b). Hence, the mice had to keep track of the history of past choices and their outcomes in order to make optimal choices in this task. The mice were trained in the task for 14–21 d after injecting an adeno-associated virus (AAV) carrying DIO-hM4Di-mCherry into the dorsal CA1 (CaMKIIa-Cre mice), CA2 (RGS14-Cre mice), CA3 (Grik4-Cre mice), or DG (Rbp4-Cre mice; Fig. 1c and Supplementary Fig. S1). These mice were then tested with dimethyl sulfoxide (DMSO; vehicle) or clozapine-N-oxide (CNO; 5 mg/kg) injection (i.p.) on alternate days for 20 d. During the experimental sessions with DMSO injection, all animals showed biased choices towards the higher-reward-probability target typically within ~15 trials after a block transition (Fig. 1b), so that the mouse’s choice behavior during the steady state (see Methods) was consistent with the generalized matching law25 (Fig. 1d). A logistic regression analysis revealed that the mouse’s choice was influenced by past choice outcomes in all animal groups (Fig. 1e).

### Chemogenetic inactivation of hippocampal subregions

To confirm inactivation of the intended brain areas by CNO injection, we examined physiological effects of CNO injection in a separate group of animals (CaMKIIa-Cre, n = 3; RGS14-Cre, n = 4; Grik4-Cre, n = 2; Rbp4-Cre mice, n = 4). These mice were injected with AAV carrying DIO-hM4Di-mCherry into the dorsal CA1, CA2, CA3, or DG, implanted with eight tetrodes in the target areas, and allowed to move freely on a pedestal during the experiment (Supplementary Fig. S2). CNO, but not DMSO, injection suppressed neural activity in all tested subregions (paired t-test, CA1, DMSO, n = 12 units, t(11) = 0.030, p = 0.977; CNO, n = 23, t(22) = 4.797, p = 8.6×10−5; CA2, DMSO, n = 17, t(16) = −0.921, p = 0.371; CNO, n = 16, t(15) = 4.979, p = 1.6×10−4; CA3, DMSO, n = 11, t(10) = −0.024, p = 0.981; CNO, n = 11, t(10) = 3.172, p = 0.010; DG, DMSO, n = 7, t(6) = −1.539, p = 0.175; CNO, n = 12, t(11) = 2.616, p = 0.024; Fig. 2).

### Effects of CNO on RL model parameters

We examined effects of CNO on the animal’s choice behavior using a simple RL model (Q-learning model; Eqs 3 and 4)26. All mice showed biased choices towards the higher-reward-probability target after block transition, and their choice behavior was well captured by the model (Fig. 1b). In each trial, the Q-learning model selects a target based on relative values of two targets and updates value of the chosen target based on reward prediction error (the difference between expected and actual outcomes)26. The Q-learning model contains two free parameters: learning rate (α), which determines the extent to which reward prediction error overrides old value information, and inverse temperature (β), which determines the degree of value-dependent action selection (or randomness in action selection). The learning rate was significantly decreased following CNO compared with DMSO injections in CaMKIIa-Cre mice (paired t-test, t(10) = 4.355, p = 0.001), but not in the other animal groups (RGS14-Cre, t(10) = −0.107, p = 0.917; Grik4-Cre, t(10) = 0.355, p = 0.730; Rbp4-Cre, t(10) = 0.730, p = 0.482; Fig. 3a,b). CNO injection had no significant effect on the inverse temperature in any animal group (CaMKIIa-Cre, t(10) = −1.471, p = 0.172; RGS14-Cre, t(10) = 0.485, p = 0.638; Grik4-Cre, t(10) = 1.480, p = 0.170; Rbp4-Cre, t(10) = −1.675, p = 0.125; Fig. 3c,d). Similar results were obtained when we used several variants of the Q-learning model (Eqs 5 and 6; Supplementary Fig. S3). CNO injection slightly increased trial duration in all animal groups, but it could not account for the CNO effect on learning rate in CaMKIIa-Cre mice (Supplementary Fig. S4). These results indicate that inactivation of CA1, but not the other hippocampal subregions, impaired value updating process without affecting value-dependent action selection.

### Effects of CNO on choice behavior

The results of the model-based analysis indicate that CA1-inactivated mice are slower in updating action values in the present task. To test whether this is reflected in the animal’s behavioral performance, we assessed effects of CA1 inactivation on the proportions of rewarded trials (P(R)) and higher-reward-probability target choices (P(H)). An analysis of all trials together showed no significant difference in these measures between CNO and DMSO conditions in CaMKIIa-Cre mice (paired t-test, P(R), t(10) = 0.699, p = 0.500; P(H), t(10) = 0.481, p = 0.641). Significant differences were found, however, when we separately examined behavioral performances during early and late trials after block transition. It would be advantageous to rapidly update values shortly after block transition (dynamic state) because subjective values (estimated reward probabilities) and objective values (true reward probabilities) are likely to differ largely during this phase. By contrast, slow value learning would not be deleterious to choice behavior during late trials after block transition (steady state) because objective values stay the same during this phase and subjective values will eventually catch up with objective values even with slow value learning. Both P(R) and P(H) were significantly lower under CNO than DMSO conditions during the dynamic state (see Methods, 8.2 ± 2.3 trials/block, mean ± SD) (P(R), t(10) = 2.492, p = 0.032; P(H), t(10) = 2.789, p = 0.019), but not during the steady state (26.5 ± 4.7 trials/block, mean ± SD) (P(R), t(10) = −0.932, p = 0.373; P(H), t(10) = −1.661, p = 0.128; Fig. 4a,b,d,e). Consistent with these findings, it took longer for CaMKIIa-Cre mice to reverse preferential target choice after block transition (see Methods for the definition of reversal) under CNO compared to DMSO conditions (10.1 ± 0.7 and 8.2 ± 0.7 trials, respectively, mean ± SEM; paired t-test, t(10) = −2.923, p = 0.015; Fig. 4c,f). Inactivating CA2, CA3 or DG had no significant effect on P(R) (paired t-test, t(10) < 1.407, p-values > 0.190), P(H) (t(10) < 1.754, p-values > 0.110), or the number of trials to reach the reversal criterion (t(10) < 1.614, p-values > 0.138; Supplementary Fig. S5). These results indicate that it takes longer for CA1-inactivated mice to bias their choices toward the higher-reward-probability target after block transition.

### Analysis results related to episodic control of behavior

That our results are well described by an RL model does not necessarily indicate the animal’s choice behavior was based on a simple RL-like process. We performed additional analyses to examine the possibility that the CA1 inactivation effects can be explained by an alternative process than a value-updating role of CA1. First, we tested the possibility that the animals relied on episodic sequences rather than an RL-like process for their choice behavior in our task. In other words, the animals may have repeated a previously rewarding choice without concerning values of the two targets. A model comparison indicated that the RL model (Q-learning model; Eqs 3 and 4) outperforms a model relying on episodic control of choice behavior (episodic RL model27; Eqs 8 and 9) in explaining the animal’s choice behavior in the TAB task (Supplementary Table S2).

Also, for a more direct test for episodic control, we examined the dependence of the animal’s choice on a specific pattern of past choices and their outcomes (i.e., a specific episode). If the animal’s choice was based on past episodes rather than value learning, then the influence of a specific episode on the animal’s choice would not be affected by block transition. Otherwise, it will vary across a block transition. For this analysis, we examined the probability to repeat the previous target choice (P stay ) following a given episode during 10 trials before and after a block transition. This analysis was performed separately for one-, two- and three-trial episodes, which consist of 4, 16 and 64 different choice-outcome combinations, respectively. As shown by examples in Fig. 5a–c, P stay differed before and after a block transition for the majority of episodes. For a group analysis, we selected those episodes whose frequency differences between before and after a block transition were smaller than 50% of the total frequencies to avoid biased sampling from either before or after a block transition. We then pooled P stay data of all equal-length episodes from a given animal group according to their last choice and computed the slopes of the logistic regression. The slopes were significantly positive for all lengths of episode in which the last choice was the higher-reward-probability target after block transition (paired t-test, t(3) > 4.961, p-values < 0.016) except the two-trial episode under DMSO treatment (t(3) = 3.055, p = 0.055). Conversely, the slopes were significantly negative for all lengths of episode in which the last choice was the lower-reward-probability target after block transition (t(3) > 3.654, p-values < 0.036) except the two-trial episode under CNO treatment (t(3) = −2.956, p = 0.060). Furthermore, the regression slope differed significantly between the episodes with different last choices (choosing the higher- versus lower-reward-probability target after block transition) for all comparisons (t(3) > 4.112, p-values < 0.026; Fig. 5d–f). These results indicate that episodic control of choice behavior is limited in explaining the animal’s choice behavior in the current task.

### Analysis results related to model-based RL

Second, we examined the possibility that CA1 contributes to behavioral performance in the present task through its role in model-based RL6,7,8,9,12,28, in which values can be updated without actually experiencing choice outcomes, rather than model-free RL in which value are updated only through actually experienced outcomes. In the present task, a model-based RL algorithm that estimates the time of reversal would be advantageous over a model-free RL algorithm. The animals may have learnt that reward probabilities change in ~40 trials and used this information in adjusting choice behavior. If so, then the probability of choosing the lower-reward-probability target is expected to increase toward the block transition. To test this possibility, we performed a logistic regression analysis examining the probability of choosing the lower-reward-probability target during 10 trials before block transition using all choice data of a given animal group under DMSO or CNO condition. We found no significant tendency to increase the probability of choosing the lower-reward-probability target as a function of the number of trials before a block transition in any animal group under either DMSO or CNO condition (Fig. 6). These results argue against the animal’s estimating the time of reversal in the current task.

### Analysis results related to behavioral inhibition

Finally, we tested whether the CA1 inactivation effects can be explained by the proposed role of CA1 in ‘behavioral inhibition’29,30 rather than valuation. We considered several types of behavioral inhibition. First, CA1 may play a role in inhibiting hasty choices so that a choice becomes more value-dependent. That inverse temperature (β) did not change significantly by CA1 inactivation (Fig. 3c,d) argues against this possibility. Second, CA1 may suppress simple win-stay-lose-switch behavior. CNO injection decreased, rather than increased, the proportions of win-stay and lose-switch and this effect was significant only during the dynamic state (paired t-test, dynamic state, t(10) = 2.442, p = 0.035 and t(10) = 2.241, p = 0.049, respectively; steady state, t(10) = −0.248, p = 0.810 and t(10) = −0.238, p = 0.817, respectively; all trials, t(10) = 1.342, p = 0.209 and t(10) = 0.331, p = 0.748, respectively; Fig. 7a,b), arguing against this possibility. Third, CA1 may inhibit the natural tendency to alternate choices31,32. A logistic regression analysis (Eq. 2) indicated that the alternation tendency did not change following CNO injection (choice effect of t-1 trial, paired t-test, t(10) = 1.137, p = 0.282; Fig. 7c). Finally, CA1 may inhibit the tendency to choose the previously more rewarding target. This possibility was tested by adding an additional term to the base model (choice bias toward the previous high-value target; Eq. 7). CNO injection had no significant effect on this term (paired t-test, t(10) = 1.348 p = 0.522). We also examined the choice bias toward the first high-value target for a given session (Eq. 7) and found no significant effect of CNO injection on this term, either (t(10) = 0.533, p = 0.782; Fig. 7d). These results do not support a behavioral inhibition role of CA1.

### Effects of OFC inactivation

We also examined effects of inactivating the OFC in a separate group of CaMKIIa-Cre mice (n = 11) for a comparison with the effects of CA1 inactivation. The OFC and striatum are strongly implicated in value-based decision making6,33,34,35, and we chose to test OFC inactivation effects because our task involves spatial navigation and striatal inactivation is expected to cause motor impairments36. Histological examinations revealed that AAV2-hSyn-DIO-hM4Di-mCherry was expressed in the OFC (Fig. 8a). We confirmed inactivation of OFC neural activity by CNO in a separate group of mice (n = 2; paired t-test, DMSO, n = 7 units, t(6) = −0.428, p = 0.684; CNO, n = 7 units, t(6) = 3.775, p = 0.009; Fig. 8b). Neither learning rate nor inverse temperature differed significantly between CNO and DMSO injection sessions in these animals (paired t-test, t(10) = 0.563, p = 0.586 and t(10) = 0.408, p = 0.692, respectively; Fig. 8c,d). CNO injection had no significant effect on P(R) (all trials, t(10) = 0.609, p = 0.556; dynamic state, t(10) = 0.025, p = 0.981; steady state, t(10) = 0.554, p = 0.592), P(H) (all trials, t(10) = 0.652, p = 0.529; dynamic state, t(10) = 0.254, p = 0.805; steady state, t(10) = 0.566, p = 0.584), or the number of trials to reach the reversal criterion (t(10) = 0.706, p = 0.496; Fig. 8e–g), either.

## Discussion

Based on our previous finding that CA1 conveys strong value signals in a dynamic foraging task7, we examined effects of inactivating different subregions of the dorsal hippocampus on behavioral performance of mice in a dynamic foraging task that is well described by a model-free RL algorithm. We found that inactivation of CA1, but not DG, CA3, or CA2, reduces learning rate (α) without changing randomness in action selection (β). Consistent with this finding, changes in the animal’s choice behavior were detectable only during early trials after block transition (dynamic state), when rapid value learning is required for adaptive adjustment of choice behavior. Such effects were not found in the other animal groups than CaMKIIa-Cre mice, which argues against a non-specific effect of CNO37. We have shown previously that CA1 value signals were stronger than its main input (CA3) and output (subiculum) structures in rats7,38. Others have shown that spatial firing is altered by reward39 or ventral tegmental area inactivation40 in CA1, but not in CA3. Furthermore, neurons with place fields near reward locations show a strong tendency to fire together during sharp-wave ripple events in CA139, but not in CA341. The presents study, along with these physiological studies, suggests a more important role of CA1 than other hippocampal subregions in reward-based learning and updating chosen value.

CNO injection did not prevent the mice from performing the task except making them slightly slower. In addition, CA1 inactivation affected choice behavior only during the dynamic state. These results argue against the possibility that impaired behavioral performance in CA1-inactivated mice is because spatial memory functions of CA1 are compromised. We also tested three alternative accounts for the role of CA1 in controlling choice behavior. First, we tested the possibility that CA1 contributes to the performance in the current task via its role in episodic control of behavior rather than value learning. Some studies have found positive correlations between episodic memory and value learning42,43,44, and these results were generally interpreted to show indirect contributions of the hippocampus to value learning via its role in episodic memory. In addition, a recent study has shown that choice behavior in a four-arm bandit task, in which human subjects were originally thought to employ a model-free RL45, was better described by an episodic RL algorithm42. We found, however, that a conventional RL (Q-learning) model better describes the animal’s choice behavior than an episodic RL model. Also, up to three-trial episodes, the influence of past episodes on the animal’s choice differed across a block transition. These results indicate that the animal’s choice behavior in our task cannot be fully accounted for by episodic control of choice behavior. Episodic RL is useful when task structure is complex and experience is very limited27,46. However, these conditions are unmet in the present task; our task structure is relatively simple with only two choice options and the animals were over-trained before subject to pharmacological tests.

Second, we tested the possibility of CA1 contribution to the current task via its role in model-based RL (CA1 contribution to estimating the time of block transition). We found no evidence that the mice estimated the time of block transition in the current task. Third, we tested the contribution of CA1 to ‘behavioral inhibition’. This proposal was based on the finding that mice lacking an NMDA receptor subunit in the DG and CA1 (Grin1ΔDGCA1) had intact spatial memory, but were impaired in selecting between alternative targets29,30. However, our results raise the possibility that these results might be because of deficits in correctly assigning values to alternative locations rather than impaired behavioral inhibition. Grin1ΔDGCA1 mice were impaired in learning to choose between two visually identical beacons in the water maze when the starting location was closer to the decoy beacon, but not when it was closer to the target beacon29,30. This result might seem to support the behavioral inhibition over the valuation hypothesis. However, such behavioral outcome may well result from an altered cost-benefit analysis; if the distance to travel is a relatively important cost and value learning is moderately impaired by CA1 NMDA receptor deletion, altered choice behavior may be particularly pronounced when the mice have to choose the farther target. In our task, CNO-induced changes in choice behavior of CaMKIIa-Cre mice are readily explained by impaired value learning, but not by impaired behavioral inhibition. Thus, at least for the current behavioral task, impaired value learning better explains the effect of CA1 inactivation than impaired behavioral inhibition. It is notable there have been similar theoretical debates on the role of the OFC in behavioral inhibition versus valuation47,48,49,50. Together, our analysis results are more consistent with a direct contribution of CA1 to value learning than its contribution to episodic control of choice behavior, model-based RL, or behavioral inhibition.

Even though we found strong value signals in CA1, it was surprising to find significant effects of CA1 inactivation on the animal’s choice behavior, because other neural systems, especially frontal cortex-basal ganglia circuitry, have been strongly implicated in value-based decision making. Neural signals related to valuation and action selection have been found in widespread areas of the cortico-basal ganglia circuitry, and manipulations in the cortico-basal ganglia circuitry lead to altered choice behavior6,34,51,52,53,54. In addition, the hippocampus has been proposed to play a particularly important role in model-based rather than model-free RL through its roles in representing episodic/semantic memories and simulating possible outcomes of future actions6,7,8,9,12. Nevertheless, we found significant effects of CA1 inactivation on value learning in a task that is well described by a model-free RL algorithm. Even though CA1 inactivation decreased learning rate only moderately (~20% decrease), the inactivation effect was specific to and reliable within CA1-inactivated mice, and the effect was highly significant even with partial inactivation of dorsal CA1 (hM4Di expression in CA1 was confined within septal 40% along the septo-temporal axis in all animals). In addition, the inactivation of the OFC had no significant effect on learning rate in the same task, suggesting a more important contribution of CA1 than the OFC in value learning in the present task. Collectively, our results indicate that the hippocampus, especially CA1, may play an important role in incremental value learning under certain circumstances. Additional studies are needed to determine the extent to which the hippocampus is engaged in value-based decision making and to elucidate how it interacts with other neural systems. Given the essential role of the hippocampus in spatial learning55, the hippocampus may play a particularly important role in learning values associated with spatial locations, whereas the OFC and striatum may be important for other types of value learning. For example, the OFC and striatum may play important roles in learning values of objects and actions, respectively3,35,56.

Our results may seem inconsistent with the reports that amnesic patients are intact in probabilistic classification learning. Knowlton and colleagues57,58 have reported that diencephalic/hippocampal amnesic patients were impaired in the late stable phase (>50 trials), but not the early learning phase (first 50 trials) of probabilistic classification tasks, concluding intact probabilistic classification learning in amnesic patients. However, the amnesic patients showed substantially lower performance during the very early phase of the weather forecasting task (up to ~30 trials; see Fig. 2 of ref.57 and Fig. 2 of ref.58) which is a widely-used probabilistic classification task. These results may be related to our finding that CA1 inactivation induces transient deficits in choice behavior after block transition. Also, in a later study, human subjects with selective hippocampal damages were impaired at all phases of probabilistic classification tasks (weather forecasting and ice cream tasks)59. As such, it is controversial whether hippocampal amnesic patients are intact in probabilistic classification learning60,61. Moreover, numerous studies have shown that hippocampal amnesic patients are impaired in probabilistic reversal learning62,63,64,65. In rats, hippocampal lesions had no effect on probabilistic odor discrimination66, but impaired probabilistic spatial discrimination learning67. These results are consistent with our finding that CA1 inactivation impairs incremental value learning in a dynamic foraging situation. Note that the extent of hippocampal lesions/inactivation is likely to vary widely across studies. We only targeted the dorsal hippocampus in the present study, leaving the ventral hippocampus intact. A complete inactivation of the entire CA1 (including the ventral CA1) may induce larger decreases in learning rate and behavioral performance in the dynamic foraging task, which remains to be determined.

It is currently unclear how CA1 might contribute to incremental value learning. Our previous study in rats7 has shown that spatial firing of CA1 neurons is modulated by value, suggesting conjunctive representation of value and spatial information in CA1. It also has shown that all the signals necessary to update value of the chosen target (current location, reward value and actual outcome) converge in CA1 during ~2 s time window after a trial outcome, suggesting that CA1 may update value of the visited location based on these signals immediately after a trial outcome is revealed. Value can be represented in CA1 by changing synaptic weights, and dopamine may play a role in this process. CA1 receives dopaminergic projections68,69,70 that convey reward prediction error signals71,72,73. Furthermore, dopamine modulates synaptic plasticity in CA3-CA1 projections74,75,76,77, and dopaminergic manipulations alter spatial firing of CA1 place cells40,78,79,80. Hence, although additional studies are needed to elucidate the neural mechanisms whereby value information influences the information processing in the hippocampus, CA1 may update value when an animal visits a target location by changing synaptic weights in CA1 network based on converging signals of spatial location, value, and reward along with dopaminergic signals.

## Methods

### Animals

Fifty-seven young (8–12 weeks old, 20–28 g) male mice were used for behavioral (n = 44) and physiological (n = 13) experiments targeting the hippocampus. CaMKIIa-Cre knockin (B6.Cg-Tg(Camk2a-cre)T29-1stl/J, stock #005359, Jackson Laboratory; n = 14), RGS14-Cre knockin (STOCK Tg(Rgs14-cre)SR63Gsat/Mmucd, stock #036535-UCD, MMRRC; n = 15), Grik4-Cre knockin (C57BL/6-Tg(Grik4-cre)G32-4Stl/J, stock #006474, Jackson Laboratory; n = 13), and Rbp4-Cre knockin (B6.FVB(Cg)-Tg(Rbp4-cre)KL100Gsat/Mmucd, stock #037128-UCD; MMRRC; n = 15) mice were used to selectively inactivate CA1, CA2, CA3, or DG, respectively. RGS14, Grik4, and Rbp4 are selectively expressed in excitatory neurons of CA2, CA3, and DG, respectively81,82,83, but CaMKII is expressed in excitatory neurons of all hippocampal subfields and neocortex84. Hence, selective expression of hM4Di within CA1 was necessary for selective inactivation of CA1 (Fig. 1c and Supplementary Fig. S1). In addition to these hippocampal animals, 11 CaMKIIa-Cre mice were used to inactivate the OFC. The mice were individually housed in their home cages and initially allowed free access to food and water with extensive handling for at least one week. They were then gradually water deprived so that their body weights were maintained at 80~85% of their free-feeding weight throughout the experiments. Experiments were performed in the dark phase of a 12-h light/dark cycle. All experiments were performed in accordance with protocols approved by the directives of the Animal Care and Use Committee of the Korea Advanced Institute of Science and Technology (Daejeon, Korea).

Mice (CaMKIIa-Cre, n = 22; RGS14-Cre, n = 11; Grik4-Cre, n = 11; Rbp4-Cre, n = 11) were trained to perform a dynamic TAB task in a modified T-maze (37 × 25 cm, width of track: 5 cm, 12-cm high walls along the entire track; elevated 20 cm from the floor; Fig. 1a) for 14–21 d following virus injection (see below). The task is essentially similar to the rat version of the dynamic two-armed task previously used in our laboratory7,10,11. The maze contained five sliding doors to guide the animal’s navigation and five photobeam sensors to monitor the animal’s position in the maze. The mice were trained to navigate from the central stem to either goal site to obtain water reward (7 μl) and come back to the central stem via the lateral alley in each trial. Reward probability of a goal was constant within a block of trials, but changed across blocks without any sensory cues. Hence, the mice had to keep track of the history of past choices and their outcomes in order to make optimal choices in this task. Two combinations of reward probabilities (0.72:0.12 and 0.12:0.72) were alternated across four blocks of trials (Fig. 1b) and the reward probability combination for the first block was determined pseudo-randomly. The number of trials in each block was 35 plus a random number drawn from a geometric mean of 5 (maximum set at 45; 40.0 ± 5.1 trials per block and 160.1 ± 5.1 trials per session; mean ± SD).

### Chemogenetic inactivation

For behavioral testing, the mice (n = 55) were anesthetized with isoflurane (1–1.5% [vol/vol] in 100% oxygen), and two burr holes (diameter, 0.5 mm) were made bilaterally. A bolus of 0.5 µl of virus (AAV2-hSyn-DIO-hM4Di-mCherry, UNC vector core) was injected in each hemisphere at the following coordinates to inactivate different hippocampal subregions or the OFC (relative to bregma and brain surface in mm): CaMKIIa-Cre mice (CA1), −1.94 AP, ±1.4 ML, and −1.15 DV; RGS14-Cre mice (CA2), −2 AP, ±2.4 ML, and −1.5 DV; Grik4-Cre mice (CA3), −1.94 AP, ±2.1 ML, and −2 DV; Rbp4-Cre mice (DG), −1.94 AP, ±1 ML, and −1.9 DV; and CaMKIIa-Cre mice (OFC), 2.0 AP, ±1.5 ML, and −1.75 DV. The virus was injected at the rate of 0.1 µl/min in each hemisphere, and the injection needle was held in place for 10 min after virus injection. The mice were tested in the TAB task 40 min following CNO (5 mg/kg) or DMSO injection (i.p., 12 μl each, diluted in 385 μl PBS) in each daily session.

Physiological effects of CNO injection were tested in a separate group of mice (n = 15). AAV2-hSyn-DIO-hM4Di-mCherry virus was injected into the intended region (CA1, CA2, CA3, DG, or OFC) unilaterally (left or right, counterbalanced across animals) in the same manner as described above, and an array of eight microdrives each controlling one tetrode was implanted targeting the virus-injected area. Following 5–7 d of recovery from surgery, tetrodes were advanced gradually to the intended recording area with the animal allowed to move freely on a pedestal (diameter, 12 cm). Once stable unit signals were obtained for at least 30 min, unit signals were further recorded for >60 min with CNO (5 mg/kg) or DMSO injection (i.p., 12 μl each, diluted in 385 μl PBS) in each daily session. Unit signals were amplified with the gain of 10,000, filtered between 0.6–6 kHz, digitized at 32 kHz and stored on a personal computer using a Cheetah data acquisition system (Neuralynx; Bozemann, MT, USA). When unit recordings were completed, small marking lesions were made by passing an electrolytic current (20 μA, 10 s, cathodal) through one channel of each tetrode and electrode tracks and marking lesions were verified histologically according to a standard procedure85. Recoding locations were determined based on the history of electrode advancements and histologically-confirmed electrode tracks and lesion sites (Supplementary Fig. S2). All images were obtained (10x) with a Zeiss Axio Scan.Z1 slide scanner (Zeiss, Jena, Germany). Units with mean discharge rates >5 Hz (putative interneurons) were excluded from the analysis.

### Determination of dynamic state, steady state, and reversal criterion

The animal’s choice data were subjected to 7-trial moving average. The dynamic state was until the proportion of higher-reward-probability target choices (P(H)) exceeded 70% of the maximum value after block transition, and the steady state was after exceeding 90% of the maximum value in each block. The reversal criterion was when the proportion of higher-probability-target choices exceeded 70% of the steady-state value.

### Matching law

Steady-state behavioral data was analyzed to test their conformity to the generalized matching law as follows25:

$$\frac{{C}_{L}}{{C}_{R}}=b{(\frac{{R}_{L}}{{R}_{R}})}^{a},$$
(1)

where C L (or C R ) and R L (or R R ) are choice frequency and reinforcement frequency for the left (or right) goal, respectively. The coefficients a and b are the sensitivity to the reinforcement ratio and a bias term, respectively.

### Logistic regression analysis

Effects of previous choices and their outcomes on the animal’s goal choice were estimated using the following logistic regression model10,86:

$$\mathrm{log}(\frac{{p}_{L}(i)}{{p}_{R}(i)})=\sum _{j=1}^{10}{r}_{j}^{r}({R}_{L}(i-j)-{R}_{R}(i-j))+\sum _{j=1}^{10}{r}_{j}^{c}({C}_{L}(i-j)-{C}_{R}(i-j)+{r}_{0},$$
(2)

where p L (i) (or p R (i)) is the probability of selecting the left (or right) goal in the i-th trial. The variables R L (i) (or R R (i)) and C L (i) (or C R (i)) are reward delivery at the left (or right) goal (0 or 1) and the left (or right) goal choice (0 or 1) in the i-th trial, respectively. The coefficients $${r}_{j}^{r}$$ and $${r}_{j}^{c}$$ denote the effect of past rewards and choices, respectively, and r0 is a bias term.

### Reinforcement learning model

We used the Q-learning model26 to analyze choice behavior of mice. In the Q-learning model, action values (Q a (t)) were computed in each trial as the following:

$$\begin{array}{ll}\mathrm{if}\,\,{\rm{a}}={\rm{a}}({\rm{t}}), & {Q}_{a}(t+1)=(1-\alpha ){Q}_{a}(t)+\alpha R(t)\\ {\rm{else}} & {Q}_{a}(t+1)={Q}_{a}(t),\end{array}$$
(3)

where α is the learning rate, R(t) represents the reward in the t-th trial (1 if rewarded and 0 otherwise) and a indicates an action (left or right goal choice).

Actions were chosen according to the softmax action selection rule, in which choice probability varied as a graded function of the difference in action values (Q L (t) − Q R (t)), as the following:

$${P}_{L}(t)=\frac{1}{1+\exp (-\beta ({Q}_{L}(t)-{Q}_{R}(t)))}$$
(4)

where P L (t) is the probability to choose the left goal, β is the inverse temperature that defines the degree of randomness in action selection.

We also examined several variants of the Q-learning model (base model or model 1). The model 2 contained a choice bias (bias toward the left or right goal choice) term as an additional variable to the base model. The model 3 contained separate learning constants for positive and negative outcomes (i.e., rewarded and unrewarded trials, respectively). The model 4 contained a stay bias (bias to repeat the previous choice) as an additional variable to the base model. All three models can be expressed by the following equations:

if a = a(t),

$$\begin{array}{llll}\mathrm{if}\,\,{\rm{R}}({\rm{t}}) & = & 1\, & {Q}_{a}(t+1)=(1-{\alpha }_{pos}){Q}_{a}(t)+{\alpha }_{pos}R(t)-\gamma \\ \mathrm{else}\, & & & {Q}_{a}(t+1)=(1-{\alpha }_{neg}){Q}_{a}(t)+{\alpha }_{neg}R(t)-\gamma \end{array}$$

else

$$\begin{array}{llll} & & & {Q}_{a}(t+1)={Q}_{a}(t).\end{array}$$
(5)

where α pos and α neg are learning rates for rewarded and unrewarded trials, respectively, and γ is the penalty term for repeating the same choice. Actions were chosen according to the softmax action selection rule as the following:

$${P}_{L}(t)=\frac{1}{1+\exp (-\beta ({Q}_{L}(t)-{Q}_{R}(t))+b)}$$
(6)

where b is a bias term for selecting the left target. The following constraints were applied to these parameters for different models: model 2, α pos  = α neg , γ = 0; model 3, b = γ = 0; model 4, α pos  = α neg , b = 0. The results of model comparison are shown in Supplementary Table S1.

To test a role of CA1 in behavioral inhibition29,30, an additional term (Q preference ) was added to the base model as the following:

if the preferred target is the left goal,

$$\begin{array}{rcl}{P}_{L}(t) & = & \frac{1}{1+\exp (-\beta ({Q}_{L}(t)-{Q}_{R}(t)+{Q}_{preference}))}\end{array}$$

else

$$\begin{array}{rcl}{P}_{L}(t) & = & \frac{1}{1+\exp (-\beta ({Q}_{L}(t)-{Q}_{R}(t)-{Q}_{preference}))}\end{array},$$
(7)

where Q preference is a bias term for the preferred target. It was defined in two different ways. First, the preferred target was the target (left or right) chosen ≥80% during the last 10 trials. Once set, it was maintained until the alternative target becomes the preferred target. Second, the preferred target was defined as the first target chosen ≥80% during a run of 10 trials. The bias term was set to zero at the outset of each session until the preferred target was first determined. In practice, the preferred target is equivalent to the high reward-probability target in the previous block (first definition) or in the first block (second definition).

Model parameters were estimated for each animal using choice data across all sessions based on a maximum likelihood procedure87.

### Episodic RL model

We used a sampling model27,42 as an episodic RL model. In each trial, the probability to obtain a reward by taking a particular action ‘a’, $${\rm{P}}(\,{Q}_{a}^{{\rm{sample}}}(t)=reward)$$, was computed by sampling the same action trials in the past as the following:

if a = a(t)

$$\begin{array}{rcl}\mathrm{if}\,\,R(t) & = & 1\\ & & {\rm{P}}({Q}_{a}^{{\rm{sample}}}(t+1)=1)={\alpha }^{sample}+(1-{\alpha }^{sample}){\rm{P}}({Q}_{a}^{{\rm{sample}}}(t)=1),\\ & & {\rm{P}}({Q}_{a}^{{\rm{sample}}}(t+1)=0)=(1-{\alpha }^{sample}){\rm{P}}({Q}_{a}^{{\rm{sample}}}(t)=0)\\ {\rm{else}} & & \\ & & {\rm{P}}({Q}_{a}^{{\rm{sample}}}(t+1)=0)={\alpha }^{sample}+(1-{\alpha }^{sample}){\rm{P}}({Q}_{a}^{{\rm{sample}}}(t)=0),\\ & & {\rm{P}}({Q}_{a}^{{\rm{sample}}}(t+1)=1)=(1-{\alpha }^{sample}){\rm{P}}({Q}_{a}^{{\rm{sample}}}(t)=1)\end{array}$$

else

$$\begin{array}{lll} & & {\rm{P}}({Q}_{a}^{{\rm{sample}}}(t+1)=1)={\rm{P}}({Q}_{a}^{{\rm{sample}}}(t)=1),\\ & & {\rm{P}}({Q}_{a}^{{\rm{sample}}}(t+1)=0)={\rm{P}}({Q}_{a}^{{\rm{sample}}}(t)=0)\end{array}$$
(8)

where αsample is a decay constant of the sampling model. Actions were chosen according to the softmax action selection rule as the following:

$${P}_{L}(t)=\sum _{{Q}_{L}^{{\rm{sample}}}(t)}\,\sum _{{Q}_{{\rm{R}}}^{{\rm{sample}}}(t)}{\rm{P}}({Q}_{L}^{{\rm{sample}}}(t)){\rm{P}}({Q}_{R}^{{\rm{sample}}}(t))\frac{\exp (\beta {Q}_{L}^{{\rm{sample}}}(t))}{\exp (\beta {Q}_{L}^{{\rm{sample}}}(t))+\exp (\beta {Q}_{R}^{{\rm{sample}}}(t))}$$
(9)

where $$\,{Q}_{a}^{{\rm{sample}}}(t)$$ is 1 (or 0) if rewarded (or unrewarded).

### Statistical analysis

Statistical significance of a regression coefficient was tested based on a t-test. Paired t-tests were used to compare choice-related variables under DMSO and CNO injection conditions (within-subject comparisons). All statistical tests were based on two-tailed tests. A p value < 0.05 was used as the criterion for a significant statistical difference. Data are expressed as mean ± SEM unless noted otherwise.

### Data availability

The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.


text:
Prove that $\sum \limits_{cyc}\frac {a}{(b+c)^2} \geq \frac {9}{4(a+b+c)}$

Given $a$, $b$ and $c$ are positive real numbers. Prove that:$$\sum \limits_{cyc}\frac {a}{(b+c)^2} \geq \frac {9}{4(a+b+c)}$$

Additional info: We can't use induction. We should mostly use Cauchy inequality. Other inequalities can be used rarely.

Things I have done so far: The inequality look is similar to Nesbitt's inequality.

We could re-write it as: $$\sum \limits_{cyc}\frac {a}{(b+c)^2}(2(a+b+c)) \geq \frac{9}{2}$$

Re-write it again:$$\sum \limits_{cyc}\frac {a}{(b+c)^2}\sum \limits_{cyc}(b+c) \geq \frac{9}{2}$$ Cauchy appears: $$\sum \limits_{cyc}\frac {a}{(b+c)^2}\sum \limits_{cyc}(b+c) \geq \left(\sum \limits_{cyc}\sqrt\frac{a}{b+c}\right)^2$$ So, if I prove $\left(\sum \limits_{cyc}\sqrt\frac{a}{b+c}\right)^2 \geq \frac {9}{2}$ then problem is solved.

Re-write in semi expanded form:$$2\left(\sum \limits_{cyc}\frac{a}{b+c}+2\sum \limits_{cyc}\sqrt\frac{ab}{(b+c)(c+a)}\right) \geq 9$$

We know that $\sum \limits_{cyc}\frac{a}{b+c} \geq \frac {3}{2}$.So$$4\sum \limits_{cyc}\sqrt\frac{ab}{(b+c)(c+a)} \geq 6$$

So the problem simplifies to proving this $$\sum \limits_{cyc}\sqrt\frac{ab}{(b+c)(c+a)} \geq \frac{3}{2}$$

And I'm stuck here.

Let $x=b+c,y=c+a,z=a+b$, then $a=\frac{y+z-x}{2},\dots$. Your inequality becomes $$(x+y+z)\left(\frac{y+z-x}{x^2}+\cdots\right)\geq 9.$$

Write $y+z-x=(x+y+z)-2x,\dots$ we need to show $$(x+y+z)^2\left(\frac{1}{x^2}+\frac{1}{y^2}+\frac{1}{z^2}\right) -2(x+y+z)\left(\frac1x+\frac1y+\frac1z\right)\geq 9.$$

Use $3\left(\frac{1}{x^2}+\frac{1}{y^2}+\frac{1}{x^2}\right)\geq \left(\frac1x+\frac1y+\frac1z\right)^2$, we only need to show

$$\frac13(x+y+z)^2\left(\frac1x+\frac1y+\frac1z\right)^2-2(x+y+z)\left(\frac1x+\frac1y+\frac1z\right)\geq 9.$$ The last inequality is correct because $(x+y+z)\left(\frac1x+\frac1y+\frac1z\right)\geq 9$.

Since the inequality is homogeneous, WLOG assume that $a+b+c = 1$.

Then, the inequality becomes $\dfrac{a}{(1-a)^2}+\dfrac{b}{(1-b)^2}+\dfrac{c}{(1-c)^2} \ge \dfrac{9}{4}$.

Since the function $f(x) = \dfrac{x}{(1-x)^2}$ is concave up for $x > 0$, by Jensen's Inequality, we have:

$f(a)+f(b)+f(c) \ge 3f\left(\dfrac{a+b+c}{3}\right) = 3f\left(\dfrac{1}{3}\right) = \dfrac{9}{4}$, as desired.

Well I found a different approach for solving this problem. We could rewrite the inequality from the question as:

$$(a+b+c)\left(\sum \limits_{cyc}\frac {a}{(b+c)^2}\right) \ge \frac{9}{4}$$

By the Cauchy-Schwarz inequality:

$$(a+b+c)\left(\sum \limits_{cyc}\frac {a}{(b+c)^2}\right) \ge \left(\sum \limits_{cyc}\frac {a}{b+c}\right)^2$$

And by Nesbitt's inequality:

$$\left(\sum \limits_{cyc}\frac {a}{b+c}\right)\ge \frac{3}{2}$$

So

$$\left(\sum \limits_{cyc}\frac {a}{b+c}\right)^2 \ge \frac{9}{4}$$

$\sum \limits_{cyc}\dfrac {a}{(b+c)^2}=\sum \limits_{cyc}\dfrac {2a^2}{2a(b+c)^2} \ge \dfrac{2(a+b+c)^2}{2a(b+c)^2+2b(a+c)^2+2c(a+b)^2}\ge \dfrac{2(a+b+c)^2}{3\times \left(\dfrac{2a+2b+2c}{3}\right)^3}=\dfrac {9}{4(a+b+c)}$

Let $a+b+c=3$.

Hence, we need to prove that: $$\sum_{cyc}\frac{a}{(3-a)^2}\geq\frac{3}{4}$$ or $$\sum_{cyc}\left(\frac{a}{(3-a)^2}-\frac{1}{4}\right)\geq0$$ or $$\sum_{cyc}\frac{(a-1)(9-a)}{(3-a)^2}\geq0$$ or $$\sum_{cyc}\left(\frac{(a-1)(9-a)}{(3-a)^2}-2(a-1)\right)\geq0$$ or $$\sum_{cyc}\frac{(a-1)^2(9-2a)}{(3-a)^2}\geq0$$ and since $\{a,b,c\}\subset(0,3)$, we are done!

Without loss of generality, we assume that $a+b+c=1$. Then, \begin{align*} \frac{a}{(b+c)^2} + \frac{b}{(a+c)^2} + \frac{c}{(b+a)^2} &= \frac{a^2}{a(b+c)^2} + \frac{b^2}{b(a+c)^2} + \frac{c^2}{c(b+a)^2}\\ &\ge \left(\frac{a}{b+c} + \frac{b}{a+c}+\frac{c}{b+a} \right)^2\\ &=\left(\frac{1}{b+c} + \frac{1}{a+c}+\frac{1}{b+a} -3 \right)^2\\ &\ge \left(\frac{3}{2} -3 \right)^2\\ &=\frac{9}{4}. \end{align*}


text:
2 edited body

## Mathematica, 65

Should be quite fast enough, although I have to admit I peakedpeeked at the other submissions before making this.

f = (n = #;
l = 0;
While[n > 0,
m = Floor[Log2[1 + n]];
l += 10^(m - 1);
n -= 2^m - 1
]; l)&

Usage:

f[1000000000000000000]

Output:

11011110000010110110101100111010011101100100000000000001102

Starts giving MaxExtraPrecision error messages somewhere past 10^228 (for which it calculates the result in .03 seconds on my machine)

After removing the MaxExtraPrecision limit, it will handle numbers up to around 10^8000 in a second.

Input:

Timing[Block[{$MaxExtraPrecision = Infinity}, f[10^8000]];]  Output: {1.060807, Null}  ## Mathematica, 65 Should be quite fast enough, although I have to admit I peaked at the other submissions before making this. f = (n = #; l = 0; While[n > 0, m = Floor[Log2[1 + n]]; l += 10^(m - 1); n -= 2^m - 1 ]; l)&  Usage: f[1000000000000000000]  Output: 11011110000010110110101100111010011101100100000000000001102  Starts giving MaxExtraPrecision error messages somewhere past 10^228 (for which it calculates the result in .03 seconds on my machine) After removing the MaxExtraPrecision limit, it will handle numbers up to around 10^8000 in a second. Input: Timing[Block[{$MaxExtraPrecision = Infinity}, f[10^8000]];]

Output:

{1.060807, Null}

## Mathematica, 65

Should be quite fast enough, although I have to admit I peeked at the other submissions before making this.

f = (n = #;
l = 0;
While[n > 0,
m = Floor[Log2[1 + n]];
l += 10^(m - 1);
n -= 2^m - 1
]; l)&

Usage:

f[1000000000000000000]

Output:

11011110000010110110101100111010011101100100000000000001102

Starts giving MaxExtraPrecision error messages somewhere past 10^228 (for which it calculates the result in .03 seconds on my machine)

After removing the MaxExtraPrecision limit, it will handle numbers up to around 10^8000 in a second.

Input:

Timing[Block[{$MaxExtraPrecision = Infinity}, f[10^8000]];]  Output: {1.060807, Null}  1 ## Mathematica, 65 Should be quite fast enough, although I have to admit I peaked at the other submissions before making this. f = (n = #; l = 0; While[n > 0, m = Floor[Log2[1 + n]]; l += 10^(m - 1); n -= 2^m - 1 ]; l)&  Usage: f[1000000000000000000]  Output: 11011110000010110110101100111010011101100100000000000001102  Starts giving MaxExtraPrecision error messages somewhere past 10^228 (for which it calculates the result in .03 seconds on my machine) After removing the MaxExtraPrecision limit, it will handle numbers up to around 10^8000 in a second. Input: Timing[Block[{$MaxExtraPrecision = Infinity}, f[10^8000]];]

Output:

{1.060807, Null}


text:
# Volume of Sphere Formula

## Formula

### Summary

The volume of a sphere is given by two-thirds multiplied by the circle constant (tau) multiplied by the radius cubed, where . The value of is approximately . The radius is measured from the center of the sphere to any point on its surface.

Variable Description
The volume of the sphere.
The variable represents the radius of the sphere.
The circle constant (tau)

## Usage

The volume of a sphere is given by two-thirds multiplied by the circle constant (tau) multiplied by the radius cubed. For example, to calculate the volume of a sphere with a radius of 4 the formula is:

## Examples

### Example 1

This example demonstrates how to calculate the volume of a sphere with a radius equal to .

#### Steps

1. Set up the volume for a sphere formula.

2. Substitute the radius into the equation.

3. Evaluate the exponent expression.

The volume of the sphere is equal to cube units or approximately cube units.

### Example 2

This example demonstrates how to calculate the volume of a sphere with a radius equal to .

#### Steps

1. Set up the volume for a sphere formula.

2. Substitute the radius into the equation.

3. Evaluate the exponent expression and combine like terms

The volume of the sphere is equal to cube units or approximately cube units.


text:
# Question about Waves

1. Dec 2, 2013

### sapz

Hello,
I'm trying to figure out a solution of a question I saw, I'll ask it here in this forum because perhaps this is where it belongs.

Let's say I have a Pulse wave that I am given it's frequency spectrum: $B(w) = V_0\frac{Sin[(w-w_0)T]}{(w-w_0)T}$ Where V0, T, w0 are constants.

So I do an inverse fourier transform to get the actual wave, and I get:
$B(t) = F^{-1}( B(w) ) = \frac{V_0}{T}\sqrt{\frac{\Pi}{2}}e^{-iw_0t}[Heaviside(t+T)-Heaviside(t-T)]$

And now I'm asked, what is the intensity of the pulse for w=w0?

So the solution I've seen, claims that when w=w0, you get:
$B(t)_{w=w_0} = B(w_0)Sin(w_0t)$ (Where B(w0) is when you put w0 in B(w))
It states this without an explanation of why this is correct.

(And after you have that, you can find the intensity pretty easily, but its here that I get stuck)

To me, this statement ($B_{w=w_0}(t) = B(w_0)Sin(w_0t)$) makes sense only if the entire wave B(t) was an odd function, because then it would comprise only of Sin waves.
And then, out of all the continuous values of w I could take only the one I'm interested in, which is w0, and putting it in B(w) would give me the amplitude of that specific wave.

How is this statement justified? Is B(t) an odd function?

2. Dec 2, 2013

### Simon Bridge

Sketch it out - is it?

The difference between cosine and sine is just phase though.
Technically it only needs to be odd at t=0 since it is saying that B(t) is oscillating.
Can you tell if the pulse is composed entirely of sine waves or not by examining B(w)?

3. Dec 2, 2013

### sapz

I don't really know how to sketch it since it has an imaginary part... Do I take only the real part?
I which case it is not odd, but even.

As to B(w), it is not even and not odd, I think. So can it tell me something about the form of B(t) just by examining it?

Last edited: Dec 2, 2013
4. Dec 2, 2013

### Simon Bridge

When $\omega=\omega_0$, $B(\omega)=?$
The frequency spectum is a sinc function right? It's symmetric about...?

Don't you also expect $B_\omega$ to be different for different values of $\omega$?
Do you have a general expression for this?

Last edited: Dec 2, 2013
5. Dec 3, 2013

### sapz

I'm really not sure I'm getting where you're going with this.

When w=w0, B(w)=V0. So its symmetric around w0. I do expect Bw to be different for different values of w, but that is true whether b(t) is even or odd or neither.
Does it tell me anything about the symmetric properties of b(t)?

6. Dec 3, 2013

### Simon Bridge

The hard part about this is trying to nudge you into the answers without actually telling you the answer ...

You are concerned that:
$B_\omega(t)=\mathcal{B}(\omega)\sin\omega t$

Should be
$B_\omega(t)=\mathcal{B}(\omega)\cos\omega t$

... or... something... I was hoping you'd tell me your understanding ;)
i.e. symmetric or anti-symmetric in time.

These two differ only by phase - i.e. by the choice of t=0.
So you are looking for a way to tell what the appropriate phase is - of if that even matters.

7. Dec 3, 2013

### sapz

My understanding is that the phase is extremely important, since the next step would be to find the intensity by integration of z|b'(t)|^2 (which is the instantaneous intensity) over [0,T] (because the wave exists in [-T,T] and there is no negative time], and T is not neccesarily the period, its a given constant. So phase does matter - I can't shift the time axis.

So it is important to decide whether we get sin or cos, and the way I could think of to do that, would be to determine if the pulse is odd or even.

Last edited: Dec 3, 2013
8. Dec 3, 2013

### Simon Bridge

... hmmm, first time you've mentioned instantanious intensity.

I take it, then, you are trying to calculate the contribution to the instantanious intensity vector $I(\vec{r},t)$ for 1D pulse propagating along the z axis - and you suspect the book made a mistake in the phase of the components of the time-domain pulse?

Perhaps the best thing for your understanding would be to procede as if you have it right and see what difference it makes.

9. Dec 4, 2013

### Simon Bridge

OK - I've had a chance to review.
Your question seems to be related to your other thread:


text:
# Reading Best of inbound: January

I can remember when inbound.org launched publicly in February this year. It’s a great site, like hacker news for online marketing – however, sadly with less discussions. Even if you read inbound daily, you may miss some article or forget another over time – so I decided, to read the top 25 (up to 50) most popular each month and summarize the insightful ones. Like always, these are mainly notes, i.e. I won’t write down things that I talked about before. Enjoy!

Introducing Scrape Rate – A New Link Metric

• Scrape rate: number of intitle:“your post title” / number of checked posts (at least 1 month old)
• Guest blogging: host blog with high readership vs. blog with high scrape rate

Google+ SEO: The Ultimate Guide
Great guide, however extremely long. Check it out, if you’re interested.

Strategic Link Building: Why You Don’t Need To Outrun Lions

• SEO isn’t about cracking Google – it’s about beating your competitors for a keyword
• SERP and competitor analysis should be a key component
• Look into more developed country markets to see the future of your country market
• The rest of the article is an interesting case study

Second Tier Link Building for ROI

• Links aren’t just useful for SEO
• For example, an article reviews your product, ranks quite high
• If you push that article, it may rank higher and gives you more referral traffic and conversions
• Often low competition => just push the article instead of your own site, esp. if the article just reviews your product alone

21 Tactics to Increase Blog Traffic

• Use AdPlanner to find related sites / communities
• Create graphics / illustrations that can be shared
• Conduct keyword search for writing posts
• Reference to useful other posts (internal & external(!))
• Guest post and invite guest blogger: http://myblogguest.com/
• Interact with other people: social media, commenting, boards, etc.
• Create contests, ranking and similar vanity objects
• Competitive intelligence(!)
• Don’t give up

Why These 3 Ranking Factors Matter (but Nobody Seems to Care About)

• Authorship Markup: builds trust & stands out; How to add author information in search results
• Freshness: content change of page, new links, age of page
• Category Authority: Focus on a very narrow topic, create tightly linked content, build links

How to increase the odds of your content going viral

• The right format: easy to find, compelling visuals, print version gets more shared – make them the standard
• Get buying from your influencers before you publish it
• Get content from influencers: reviews, survey, opinion, lessons learned
• Topic, Timing, Seeding: Topical news, Mo – Thu for B2B
• Analyze everything and test!

Golilocks SEO

• Start with mid- to longtail keywords on new sites and go into highly competitive keywords later on
• Mix keywords, related words and synonyms
• Split your budget into content and marketing for the content
• Grow your site strategically using data from analytics & CI
• Diverse anchor texts
• Point links to the most relevant pages & boost pages that need more attention
• Mix different link qualities
• Gradually build new links and try to get viral campaigns going

5 Forms of Scarcity

• Classic limited stock: “only 2 books left”
• Geographically limited stock: “currently out of stock at the store in Boston, but in stock online”
• Real time scarcity: basically all flights
• Auctions: Holland, English, n-price auction, etc.
• Treasure hunts / limited offers

# #4/25: Experimental Auctions

I decided to write in bullet-point type of stile because these summaries/reviews slowly become wall of texts which for one take long to write and make it, in my opinion, harder to read.

• Values are revealed by actions — if you pay $2 for some chocolate than you value the chocolate more than your$2
• How can we measure the value of non-market goods?
• => Revealed preference methods, i.e. (particular) auctions.
• Erases the problem of hedonistic pricing which requires market prices a priori.
• Also better than stated preference methods, i.e. surveys and trails — the big problem is that these methods are hypothetical and allow strategic behavior (manipulation)
• Experimental auctions are a better choice because of:
• a) They use real money and real goods.
• b) They can be carried out in real environments, e.g. supermarkets

Value theory

• Willingness to Pay (WTP): if person do not own the good, how much is the person willing to pay to get the extra good?
• Willingness to Accept (WTA): if person owns the good, how much does person need to accept the loss of the good?
• However difference between WTP and WTA depends on the risk behavior. Problematic: We have to estimate Arrow-Pratt but measuring risk-aversion is hard and destroys the sense of experimental auctions.
• Furthermore, we have to include time. Proposed formula: WTP today = Expected Value – commitment costs, which includes uncertainty, lack of information, patience, reverse transaction, freedom, etc.

Preliminaries

• What’s the objective? Do we want to test, explore or generalize?
• Simple experiment design: Attribute vs. Attribute, however we need $2^\text{\#Attributes}$ different test cases.
• Better: Fractional factorial design. Assumes there are no interaction effects which makes the main effects separately identifiable.
• e.g. three attributes (H vs. L, S vs. L and B vs. R). Normal design:

Factorial design, just needs:
• Randomize treatment but control for time effects (time of the day, weekday, etc.)
• Furthermore, control within-subject change. E.g. with ABA designs, i.e. first treatment A, then B, then A.
• For experimental auctions however a problem, i.e. demand reduction effect. Solution: Only one treatment will be binding and will be picked randomly.
• Furthermore, external effects, e.g. superior information about market prices. Solution: Inform people as good as possible; you can also provide substitute products for sale at a fixed price.

Field vs. laboratory

• pro lab: better control, less confounding variables
• pro field: more realistic, self-selecting population -> less sample-selection bias, more knowledge in established environment & experience, reduced costs
• Problem: Hawthorne effect, i.e. if people think that they are being watched they change their behavior

Conducting experimental auctions

• Qualitative study prior designing to learn about decision-making processes and general info
• Focus groups and pretests to met objective
• Teach them about your mechanism and optimal behavior
• Real-money practice rounds with another good helps to learn how auctions work
• You can do the auction anonymously — but that can be relaxed

Endowment vs. full bidding approach

• Endowment bidding: Give participants the inferior good or they have it beforehand. Let them bid on how much they want to pay or receive to give up endowed good. This measures the real value between the endowed and auctioned good.
• Full bidding: Here you don’t get the exact value because of transaction costs, however you have an estimate for the absolute value.
• Generally things to consider: Is consumption important? Is there reference dependence/loss aversion (esp. endowment bidding)? Does the endowment signal something about prices?

Mechanism

• English auction: works very well in practice and is highly accurate; furthermore people mostly understand how it works
• Second price auction: everybody gives one bid, the highest wins and pays second highest price — Works quite well, especially for high value bidders
• Random nth price: like 2nd price but n is drawn randomly, i.e. the people with the n highest bids get the good for the nth highest price — Similar to 2nd price but works better for low value bidders.
• BDM mechanism: people bid and random number is drawn, if number smaller than bid, then person gets good for drawn number — good for field studies but creates no real market environment

Some of the case studies
The books presents a lot of different case studies which are quite detailed. I won’t go into them because this would be beyond the scope of this short summary.

Auction design problems

• novelty of the experiment experience: learning effects; price increases because people learn about the optimal strategy
• preference learning: high bids to learn about unfamiliar products
• off-the-margin bidders are problematic => solution: random nth price auction

Ideas

• preference reversal: arbitrage causes value adjustments not preference adjustments
• hypothetical auctions still not revealing => idea: calibration function.
• => can work in some environments, e.g. trading cards
• => doesn’t work so well in others, esp. new products

Influences on choice and valuation

• context matters
• goods matters
• information matters
• exchange institutions matter
• market experience matters
• price information sometimes matters
• substitutes and complements matter

idea: consequential vs. inconsequential mechanisms

• consequential means that the probability of binding lies between 0 and 1
• sadly not revealing, real auction still better but not as worse as hypothetical auction

Empirical results

• internal validity of experimental auctions is high
• reliability is high, but influences on choice and valuation still matter
• some anomalies don’t exist in the long run – however, there’s also things like prospect theory and loss-aversion.
• preference reversal: market creates rationality through natural selection or budget constrains
• even with anchoring the valuation is still valid in relative terms

Future

• great tool for the future
• lots of opportunities for research

I love this book. It has enough theory and a ton of case studies — the authors don’t shy away from real problems and resent possible solutions. I seems like a rather new area but I can see a lot of potential in using experimental auctions. Especially e-commerce sites like amazon could profit highly by providing a service for producers to get WTP estimates. All in all, a superb book, more of such books, please!


text:
Someone please help me understand this.

1. Mar 15, 2006

NINHARDCOREFAN

$$\frac{\partial^2 \phi}{\partial x^2} + \lambda \phi = 0$$

We have to analyze eigenvalues.

My prof. gave me this answer for $$\lambda>0$$ it is
$$c*sin(\sqrt(\lambda))x+d*cos(\sqrt(\lambda))x$$

Shouldn't it be -$$\lambda$$ inside the squareroot? If not can someone explain how he got this?

Last edited: Mar 15, 2006
2. Mar 15, 2006

greytomato

The problem you'er presenting is homogenic.
sin and cos are natural solutions for this kind of equations.
pay attention that if you use diff on sin twice, you get -sin.
same goes for cos.
c,d = constants
you need 2 inputs to get the private solution. otherwisw it's a general solution.

3. Mar 15, 2006

NINHARDCOREFAN

I know its a general solution but I don't understand how he got the positive $$\lambda$$ inside the squareroot.

4. Mar 15, 2006

Hammie

Looks right to me.. for lambda > 0, the eigenvalue is imaginary.

Yes, it is $$\sqrt(\lambda)$$ or $$sqrt(/lambda))i$$

should be square root of neg lambda in the first.. give me a while to get latex right..

Last edited: Mar 15, 2006
5. Mar 15, 2006

CarlB

Your prof was right.

If you put a minus sign in the square root, you would have to change the sin and cosine to exponential functions. I.e. $$C \exp(\sqrt{-\lambda}x)+D\exp(\sqrt{-\lambda}x).$$

Carl

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

Have something to add?