text:
## 'Maths Shop Window' printed from http://nrich.maths.org/

### Why do this problem?

This problem introduces students to the concept of different categories of real functions which permeate advanced mathematics. It focuses on understanding the properties of the categories as a whole rather than the properties of individual examples. Hopefully students will leave with the realisation that smooth functions are a very special group of functions along with a wider understanding of functions, continuity and differentiability.

### Possible approach

This problem assumes that students will have encountered informally ideas of continuity and differentiability. You can role play this task, or play it straight as you wish.

Start by asking the students (individually or in groups) to come up with a single example of a function from each category, and then share these collectively. Key issues which are likely to occur here are 1) Some functions are members of multiple categories and 2) students will probably want to sketch examples for some categories.

Once the students are involved with the concept, ask them to produce the 'best' example of a function from each category along with a representation of the category as a whole, as if for a small display poster which would sit in a shop window.

Note: possible representations of the categories are: multiple algebraic examples, sketches/graphs, descriptions in words (such as 'functions which can be drawn without taking the pen off the paper') or formal mathematical descriptions, such as $f(x+Na) = f(x)$.

Once students have worked on their ideas they can share them, where the challenge is for others to guess the category. A 'good' solution to this part will be one which clearly points to one and only one category. Be prepared for multiple suggestions and representations and you might find differences of opinion concerning which solutions are 'best'. You can put some of these on the walls of your classroom to remind students of the meaning of the different function categories.

The last part of the question is more traditionally algebraic and can be attempted independently if you wish. Simply tabulate a grid with each property as a row and column and ask students to find algebraic examples of functions which fit in the different grid cells. How many grid cells is it possible in principle to fill? Are members of any categories automatically members of other categories? Do any particularly interesting examples crop up?

### Key questions

Do you understand all of the terms?

In what ways can you describe or represent a function?

How would you describe in words the 'essence' of each function category?

### Possible extension

(Difficult) Ask students to find examples of functions which fit none of these categories. What other sorts of categories of functions would be needed to accommodate their new examples?

### Possible support

Focus on curve sketches which best represent each category.


text:
# P = NP clarification

Let's use Traveling Salesman as the example, unless you think there's a simpler, more understable example.

My understanding of P=NP question is that, given the optimal solution of a difficult problem, it's easy to check the answer, but very difficult to find the solution.

With the Traveling Salesman, given the shortest route, it's just as hard to determine it's the shortest route, because you have to calculate every route to ensure that solution is optimal.

That doesn't make sense. So what am I missing? I imagine lots of other people encounter a similar error in their understanding as they learn about this.

• An easier example for NP-complete problem would be Sudoku. It's trivially easy to check if a sudoku is correct. It is not trivial to figure out the solution though. – Joe Feb 11 at 13:05
• @TomMercer Sudoku is NP-Complete if the grids are arbitrarily sized - I would imagine that if your recursive Sudoku solver had to do the numbers 1-16 with 16 rows and 16 columns in 4x4 boxes (or 1-25 in 5x5 boxes), the time it takes to solve would increase far more than the amount of time to check the solution would. – TheHansinator Feb 11 at 18:31
• @TomMercer: The generalized sudoku problem is the graph colouring problem. Imagine that each number in the puzzle is a node in a graph of a certain colour, and the edges are added such that each node is connected to all the nodes that cannot be the same number/colour. The sudoku problem then is "given a partial colouring of the graph, determine all the colours of all the nodes". This problem is famously difficult in general; you are right that for the special case of newspaper-quality sudoku puzzles it is pretty easy. – Eric Lippert Feb 11 at 22:16
• Of course newspaper-quality sudoku puzzles are designed so that they can be solved quickly by human brains with neurons that work at the speed of a horse-drawn carriage and can do several math operations per minute, so it should not be surprising that throwing them at hardware that does billions of operations per second where the speed of electron propagation is the limiting factor does not cause difficulties. Consider the problem of building a sudoku puzzle that is hard for a computer to solve quickly; can you get any insight into what those puzzles look like? – Eric Lippert Feb 11 at 22:22
• @TomMercer I think a misunderstand you might have in terms of difficulty is the factor time and growth. Sure it's reasonable "easy" and "fast" for us (or a computer) to solve a 3x3 sudoku. But what actually makes a problem be in NP is the rate at which the difficulty grows when increasing the size of the problem. That difference is what sets P apart from NP. For Sudoku, the growth is (after googling quickly) = O ( N^(N^2) ), which means the complexity grows to the power of itself. Polynomial Time would be something like O ( n^2 + n ), where the growth is "fixed" (as the powers are constant) – Joe Feb 12 at 9:55

Your version of the TSP is actually NP-hard, exactly for the reasons you state. It is hard to check that it is the correct solution. The version of the TSP that is NP-complete is the decision version of the problem (quoting Wikipedia):

The decision version of the TSP (where given a length L, the task is to decide whether the graph has a tour of at most L) belongs to the class of NP-complete problems.

In other words, instead of asking "What is the shortest possible route through the TSP graph?", we're asking "Is there a route through the TSP graph that fits within my budget?".

• NP-complete is a subset of NP; you are correct in your understanding of the definition of NP. Thus the decision version of the problem is in fact NP. The one where you ask for the minimum possible path is NOT NP. – D.R Feb 11 at 7:35
• Also note that "checking" does not always just mean "here's an answer, go check it." When one is checking a NP-complete answer, one is typically given extra information derived from the solving of the problem. My favorite example is proving that a number is prime. One can provide a list of "witness" integers which, together, can prove that a number is prime. Finding the correct list of numbers is very difficult, but once you have the list, the verification is trivial. – Cort Ammon Feb 11 at 15:00
• @CortAmmon As an example this works, but don't forget to state that PRIMES is in P. – David Tonhofer Feb 12 at 11:43
• If the decision problem is solvable in polytime, then TSP the optimization problem must be solvable in polytime as well right? As you can just iterate through the "questions" down until you get a NO, and then you know the optimal answer was the previous one. EDIT: You can do better than iterate down, you can binary search it, but it's still polytime * polytime which is polytime in any case – Cruncher Feb 13 at 14:55
• This answer just mixes up decision problems with function problems (or more specifically, with optimization problems). A function problem cannot be "NP hard", at least not with the traditional definition of polynomial time reducibility for decision problems which refers to set membership. This answer however fits well in a web tradition of treating of function problems without much rigor. – Jirka Hanika Feb 13 at 16:08

There is a lot of decent answers here but none clear up a couple fairly important misunderstandings you seem to have.

Both P and NP are classes of what are called "decision problems." These are problems whose answer is YES or NO. (More formally they are all questions of given a string and a language, is the string in the language but that isn't an important distinction). In this sense, you are slightly incorrect in your understanding when you say "given the optimal solution of a difficult problem, it's easy to check the answer, but very difficult to find the solution" because decision problems don't have "optimal solutions." Problems where solutions can be "evaluated" and you are looking for the "best" solution are optimization problems, of which The Travelling Salesman Problem is an example. You can always turn an optimization problem into a decision problem by considering the problem "Given an instance of this optimization problem and an integer k, does the problem have a solution whose objective value is better than k?".

Another thing is you might be slightly confused as to what NP means. P is the class of decision problems that can be solved in Polynomial Time (that you seem to understand). NP stands for "Non-deterministic Polynomial Time" and it is the class of problems that you can easily check if an instance of the problem should give a YES answer given some extra information. So looking at our TSP problem, if I have an instance of TSP, and a solution whose total cost is less than k, then I can easily check that the solution is really a solution and that its cost is less than k. So the decision problem associated with TSP is in NP. But not all problems in NP are "hard". Actually P is a subset of NP because if you can easily solve the decision problem, you can easily check if an instance gives you a YES answer by just solving it.

But there are some problems in NP we think are hard to solve. Oversimplifying a little, we call these NP-complete problems. (Note these still must be decision problems). We can say a problem A is at least as hard as problem B if, we assume we have a blackbox oracle that solves problem A and we can use it to efficiently solve problem B. Let's again consider the TSP example. Clearly, if you could solve the optimization problem (that is get the optimal solution) then you could solve the decision problem. So the optimization problem is at least as hard as its corresponding decision problem. If we showed that the decision problem version of TSP was NP-complete (which it is) then we would know that the optimization problem TSP is also as hard as NP-complete problems, but it itself is not actually NP-complete because it isn't a decision problem. We call such problems NP-hard.

• Can you illustrate P vs NP with an actual TSP example? I'm not getting it... – Tom Mercer Feb 11 at 18:09
• I am not sure what you mean by "illustrate P vs NP with an actual TSP example". P and NP are classes of problems and the decision problem version of TSP is one of the problems in NP. Looking at a specific instance of TSP wouldn't really clarify anything about what it means for a problem to be in P or NP. But to be more clear, a classic decision problem is satisfiability. An instance is a propositional logic statement, and it is a YES instance if there is some assignment of the variables that makes the statement evaluate to TRUE. – NaturalLogZ Feb 11 at 18:26
• Like, here are 4 cities, with some numbers for distances between them, here's the exact YES/NO thing you have to find. Here's what's NP about it. Here's what's P about it. But with actual TSP example. So, for example, "Is there a route between Chicago, Dallas, NYC, and SF that's less than or equal to 2,737 miles?" And which part of that is P and which part is NP. So I can grasp precisely where my understanding is lacking. – Tom Mercer Feb 11 at 18:29
• Okay so let's look at this example you created. An example is what is called an "instance" of TSP. Now if there is a route that visits those 4 cities, ending where you started, that is at most 2,737 miles, we would call it a YES instance of TSP. Furthermore, you could tell me the route and I could easily verify that the route gets me to each of the 4 cities, ending where I started (the solution is correct) and I could check that the total distance is at most 2,737 miles. Thus I can easily check that this is a YES instance. Since you could do this with any YES instance we say TSP is in NP – NaturalLogZ Feb 11 at 18:35
• I'm beginning to piece together the gap in my understanding. I know what the TSP is. It is NOT a yes/no question. The NP version of a problem related to TSP is this is there a visit-all route with length < k?. TSP means find the shortest visit-all route.It is neither P nor NP in the computer sciencey way of defining these ideas. But this TSP-related NP problem is about a specific route and a specific length k. – Tom Mercer Feb 11 at 18:56

$$P$$ and $$NP$$ are classes of decision problems. The result of an algorithm for a decision problem is either "YES" or "NO". Even for a problem in $$P$$, such an answer cannot lead to a quick verification.

An instance of the decision problem version of TSP is "Given a collection of cities and intercity distances, is there a tour with total length less than $$k$$?", where $$k$$ is a constant specified in the instance. The result is "YES" or "NO". In neither case does the answer lead to a quick verification of the correctness of the answer.

The promise that you ask about is this: Given a particular proposed tour, one can in polynomial time:

• Determine that the proposed tour actually is a tour -- visits all the cities and only traverses intercity routes that exist (sometimes "that have finite distances" when one encodes missing routes as having length $$\infty$$).
• If so, determine that the length of the route is shorter than the constant $$k$$ in the problem instance.

Neither an answer of "YES" or "NO" provides a proposed tour.

The value of the model of $$NP$$ that you are using is that it encodes a way to make a solver: for each possible tour (typically an exponentially large set to iterate over) check to see if it is a tour and if its length is $$< k$$. If so, report "YES". If we exhaust the collection of possible tours without reporting "YES", report "NO".

Note that this model suggests that the the difficulty in fast solution is not that checking the conditions takes a lot of time. The difficulty in fast solution is that there are too many potential tours to search through. So, if we could find some really, really smart way to restrict our search to only a tiny subset the collection of potential tours, we would have a fast solution for an $$NP$$ problem.

Binary search in a sorted list is an example where one has a smart way to search through the list evaluating only logarithmically many (in the length of the list) comparisons rather than linearly many comparisons. From this point of view, the TSP problem is hard because we don't know a substantially faster way to search through the proposed tours of every possible TSP problem instance.

• OK, so the crucial gap in my understanding is that TSP is NOT NP at all. TSP is to find the shortest visit-all route. The NP problem (somewhat related to TSP, but not actually the TSP) is is a visit-all route < k possible. – Tom Mercer Feb 11 at 18:53
• @TomMercer : No. The decision problem asks "Is there a tour of length less then $k$?". An algorithm is allowed to use whatever method works, which may have nothing to do with finding the shortest all-visit route. Just because you understand an algorithm for solving a problem does not mean another algorithm uses a similar method. The optimal algorithm may do something that seems completely alien to you. – Eric Towers Feb 11 at 18:56
• The decision problem is not the traveling salesman problem (TSP). The TSP is, by definition, what's the shortest visit-all route? It's an old optimization problem. CS has unfortunately mislabeled an adjacent problem TSP. – Tom Mercer Feb 11 at 18:58
• You can reduce an optimization problem to logarithmic number of decision problems, assuming you can find an upper bound on the optimal solution, via binary search. Let that upper bound be K. Is there a solution <=K? Yes. Is there a solution <= K/2? No. Is there a solution <= 3K/4? ... In polynomial time, you'll find the smallest value K for which the decision problem yields Yes. – chepner Feb 12 at 20:26
• Since that implies the optimization problem can be solved in polynomial time if the decision problem can be, you can get away with being imprecise. – chepner Feb 12 at 20:31

NP is all about decision problems - problems where the answer is "yes" or "no".

A problem is in NP if for every instance where the answer is "yes", there is a hint that let's you easily prove that the answer is "yes". It doesn't say anything about instances where the answer is "no". They can be hard to solve.

The classical Travelling Salesman problem is: Given a set of cities and their distances, is it possible to find a tour shorter than k? And quite obviously, if the answer is yes then such a tour exists, and we can use it as a hint to easily show the answer is yes. If the answer is no, then nobody has yet come up with any hint that would let you prove that.

You stated a problem that you also called "Travelling Salesman" problem, but it is actually different. You ask: Given a set of cities and their distances and a tour, is that tour the shortest tour? In this case, if the answer is "no" then there is a shorter tour, and we can use it as a hint to easily show the answer is "no". That's exactly the opposite of NP: Your alternative version of the Travelling Salesman problem is one where for every instance where the answer is "no", there is a hint that lets you easily prove the answer is "no". Because it is the exact opposite of NP, this class is called "co-NP".

There are many problems like that. For every problem in NP, you could ask the question: "Is the answer for this instance of the problem 'no'", and of course the answer is exactly the opposite of the original problem. You just made the mistake of thinking that every problem with the words "travelling" and "salesman" in it is the same problem.

• You are wrong about the "classic" (not classical) TSP. The original TSP is not a decision problem. It is an optimization problem: what's the shortest round-trip, visit-all route? Stop personalizing it as "my" problem. I'm not "calling" it the TSP. It is the original TSP. – Tom Mercer Feb 13 at 2:45
• The optimization and decision versions of the TSP are often simply referred to as TSP. When asking questions about P=NP, most people are going to assume you are talking about the decision version, as this is what makes the most sense in this context (not saying that it doesn't make sense to also talk about the optimization version, or the second decision version given by gnasher729 as they are all deeply linked). gnasher729 is not "wrong" here, he is correcting a probable misconception of yours about what problem people refer to when saying things like "TSP is NP-complete". – Tassle Feb 13 at 17:17

I find it most easy to understand by using the 3-SAT NP-complete problem:

There are $$n$$ boolean variables and you can decide for each of them either to be set the $$true$$ or $$false$$ value and you are given $$k$$ clauses. Each of the clauses contains 3 variables and the constraints to them, like $$(true OR false OR true)$$, so the clauese would be satisfied if the first variable was set to true OR the second variable to false OR the third variable to true. The $$k$$ klauses can contain all possible combinations of three of the $$n$$ variables and you have to decide what value every variable should be set to, so that all clauses are satisfied.

If you find a combination of values for all variables, so that every clause is satisfied, your combination can be vermied very easy by just going once throuegh every clause and test it, but it can be very hard to find a combination which satisfies every clause.

format: plain


text:
# The Consumption Expenditure Ec of a Person with the Income X. is Given by Ec = 0.0006x2 + 0.003x Find Mpc, Mps, Apc and Aps When the Income X = 200. - Mathematics and Statistics

Sum

The consumption expenditure Ec of a person with the income x. is given by Ec = 0.0006x2 + 0.003x. Find MPC, MPS, APC and APS when the income x = 200.

#### Solution

The expenditure Ec of a person with income x is given by

Ec = [0.0006]x^2 + [0.003]x

So, marginal propensity to consume (MPC) = d E_c/(dl)

∴ MPC = (d E_c)/d_x= 2 (0.0006) x +
(0.003)

= 0.0012 x + 0.003
MPC at  x = 200 is

=0.0012(200)+0.003

=0.24+0.003

=0.243

As MPC + MPS = 1
MPS = 1 – MPC
= 1 – 0.0243
= 0.757

Now APC=E_c/x

= 0.0006 x + 0.003
At x = 200
APC = 0.0006 × 200 + 0.003
= 0.12 + 0.003
= 0.123
As APS = 1 – APC
= 1 – 0.123
= 0.877

Is there an error in this question or solution?


text:
# Remove JSTOR ID from Biber bibliography

I use Zotero for my references and, at some point, a whole set of JSTOR ID's started appearing in my biber bibliography. I compile using pdflatex and biber.

How can I get rid of these ugly JSTOR references? I assume it's to do with the eprinttype and eprint fields which Zotero appends to my entries.

# foo.tex

\documentclass{article}
\usepackage[backend=biber,doi=false,url=false,isbn=false,
style=authoryear, maxcitenames=2,
uniquename=false]{biblatex}
\AtEveryBibitem{% Get rid of the unwanted "note" field
\clearfield{note}%
\clearlist{language}%
}

\begin{document}
\textcite{krugman_scale_1980-2}
\printbibliography
\end{document}

# foo.bib

@article{krugman_scale_1980-2,
eprinttype = {jstor},
eprint = {1805774},
title = {Scale {{Economies}}, {{Product Differentiation}}, and the {{Pattern}} of {{Trade}}},
volume = {70},
issn = {0002-8282},
number = {5},
journaltitle = {The American Economic Review},
date = {1980},
pages = {950--959},
keywords = {dixit-stiglitz-ces},
author = {Krugman, Paul},
file = {/home/rob/Zotero/storage/VD5MZDJM/Krugman - 1980 - Scale Economies, Product Differentiation, and the .pdf}
}

• If you don't want to use any other eprints, you can use eprint=false (that will also include arXiv, though). If you want to get rid of JSTOR specifically you can use Biber sourcemapping for that. – moewe Mar 1 '18 at 13:58
• @moewe That did it. Thanks. If you'd like to answer the question, I'll accept it. – LondonRob Mar 1 '18 at 14:36

There are several ways to do this.

1. The eprint=false option. This will disable all eprints, not just JSTOR. In particular this will also suppress references to the popular arXiv.
2. Get rid of JSTOR eprints in \AtEveryBibitem

\AtEveryBibitem{%
\iffieldequalstr{eprinttype}{jstor}
{\clearfield{eprint}}
{}}

3. Use Biber's sourcemapping to target JSTOR

\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=eprinttype, match={jstor}, final]
\step[fieldset=eprint, null]
}
}
}

• This is a brilliant answer. – LondonRob Mar 1 '18 at 15:18


text:
RUS  ENG JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB
 General information Latest issue Archive Impact factor Subscription Guidelines for authors License agreement Submit a manuscript Search papers Search references RSS Latest issue Current issues Archive issues What is RSS

 TMF: Year: Volume: Issue: Page: Find

 TMF, 1975, Volume 23, Number 3, Pages 399–408 (Mi tmf3915)

Method of solving the BBGKY equations for a Van Der Waals crystal

I. I. Ol'khovskii

Abstract: It is suggested that the stationary distribution functions of the successive approximations should be searched for in the form of the decomposition over $\delta$-functions and their derivatives with respect to the particles coordinates. The solutions of the zeroth and first approximations as well as corresponding expressions for the equations of the state of the Van der Vaals crystal are given.

Full text: PDF file (433 kB)
References: PDF file   HTML file

English version:
Theoretical and Mathematical Physics, 1975, 23:3, 600–607

Citation: I. I. Ol'khovskii, “Method of solving the BBGKY equations for a Van Der Waals crystal”, TMF, 23:3 (1975), 399–408; Theoret. and Math. Phys., 23:3 (1975), 600–607

Citation in format AMSBIB
\Bibitem{Olk75} \by I.~I.~Ol'khovskii \paper Method of solving the BBGKY equations for a Van Der Waals crystal \jour TMF \yr 1975 \vol 23 \issue 3 \pages 399--408 \mathnet{http://mi.mathnet.ru/tmf3915} \transl \jour Theoret. and Math. Phys. \yr 1975 \vol 23 \issue 3 \pages 600--607 \crossref{https://doi.org/10.1007/BF01041681}


text:
# How to use iPhone to evaluate an IMU chip?

I have a quadcopter like the below (source of the image)

and I have an IMU (inertial measurement unit) having acc sensors in X-Y-Z and gyro sensors in X-Y-Z. Now I am trying to find an iPhone app by which I can check the values such as rotation and accelerations in each dimensions over X-Y-Z coordinates. I need to export the data in order to design a proper smoothing algorithm probably with Kalman filter or incremental filter. I noticed that the IMU needs to be calibrated because levels do not start with zero for non-moving object. For this kind of things, independent measurements with iPhone could help to adjust things.

So how can you use iPhone to evaluate an IMU chip? Which apps? Other considerations?

• Do you have a link to the IMU chip? – Andy aka May 26 '13 at 20:03
• @Andyaka I have many of them from different vendors. The question here is to find a way to validate the results from the chips. I am not sure yet which chip to choose, I am trying to find a quality chip that is able to detect small changes in rotation and acc about the size of hand-rotation and hand-acc. For this I am trying to measure some raw data with iPhone: it has all kind of sensors so it should be possible. – hhh May 26 '13 at 21:40
• You are intending to attach the "sensor" to an iphone and fly it like the video? Is the internal sensor not good enough (bearing in mind I have no idea what the internal sensor is)? – Andy aka May 26 '13 at 21:44
• @Andyaka now you misunderstand. The IMU chip is an essential part for the stable flight with quadcopter. Without real-world testing (to which I need independent IMU-data-logger, here iPhone) and smoothing (Kalman/incremental/etc filter), the flight is very unstable. In order to judge different IMU chips in the quadcopter, I need an IMU in the iPhone/data-logger. The internal chip is irrelevant for this question: I am trying to find a tool/techniques/methods, now with iPhone, by which I can analyze/export the data for data-analysis. Yes, iPhone is attached to the quadcopter like the photo. – hhh May 26 '13 at 21:53
• Why are you trying to use an iPhone for a simple data logging exercise? It seems like it would be an expensive one too when your quadcopter falls out of the sky and smashes your iPhone. A small embedded computer such as a Gumstix would be a better option. – Amoch May 26 '13 at 22:30

## 2 Answers

What are the specifications on the iPhone accelerometer? If this were something I was working on, I would start with a static 3d test to validate the imu output when it was fixed In multiple known positions. The iPhone uses a fairly cheap part, you could probably figure out what the part number is by doing some sleuthing, and then you could figure out if the iPhone is better or worse then the imu's you are looking at

(Updates 5/27/13) From this teardown http://www.ifixit.com/Teardown/iPhone+4+Teardown/3130/2 Apple seems to use a ST Micro proprietary part. This part ST L3G4200D (http://www.st.com/web/catalog/sense_power/FM89/SC1288/PF250373) is mentioned as a potentially commercially available part.

The Iphone isn't intended as an IMU, and so if I were trading off performance vs cost when designing it, I'd go for the lowest performance, cheapest part that would work.

In your case, I'd build a fixture that I could mount an IMU in, and fix it in multiple orientations so I could determine how accurate and repeatable the IMU reading were in a known, accurate position as you're taking data. Make it so that you could put in arbitrary positions and you can evaluate coupling between directions.

I like having measurement techniques that are accurate enough to truly evaluate differences between systems. If you're using a iPhone as your reference, then you'll probably have trouble figuring out the difference between multiple sensors.

• Where did you find the information for "The iPhone uses a fairly cheap part"? Which part? SKU? – hhh May 27 '13 at 12:18
• From this teardown ifixit.com/Teardown/iPhone+4+Teardown/3130/2 Apple seems to use a ST Micro proprietary part. This part ST L3G4200D (st.com/web/catalog/sense_power/FM89/SC1288/PF250373) is mentioned as a potentially commercially available part. The Iphone isn't intended as an IMU, and so if I were trading off performance vs cost when designing it, I'd go for the lowest performance, cheapest part that would work. – rfdave May 27 '13 at 13:24

The manufacturers such as Apple do not seem to publish the details about the IMU chip. The word "teardown" returns ambiguous material over internet about specificications of different devices but hard to judge the material. I could not find the specifications -- anyway iPhone has all kind of sensors so you can get all kind of data. The below hase some apps listed, some of them are free.

Sensors

✔ 3D Accelerometer: X, Y, Z acceleration

✔ 3D Magnetometer and Compass

✔ Integrated Accelerometer and Gyro data

✔ Location and GPS: longitude, altitude, speed

✔ Proximity Sensor

✔ Misc: mic level, capacitive touch, battery, light-sensor

Apps


text:
# How do you write the lewis structure for XeF_4?

VESPER predicts an $A {X}_{4} {E}_{2}$ structure, that is octahedral with respect to electronic geometry, and SQUARE planar with respect to molecular geometry. $\angle F - X e - F \equiv {90}^{\circ}$ to a first approx.


text:
Under the auspices of the Computational Complexity Foundation (CCF)

REPORTS > DETAIL:

### Paper:

TR22-048 | 4th April 2022 23:41

#### On the Range Avoidance Problem for Circuits

TR22-048
Authors: Hanlin Ren, Rahul Santhanam, Zhikun Wang
Publication: 4th April 2022 23:41
Keywords:

Abstract:

We consider the range avoidance problem (called Avoid): given the description of a circuit $C:\{0, 1\}^n \to \{0, 1\}^\ell$ (where $\ell > n$), find a string $y\in\{0, 1\}^\ell$ that is not in the range of $C$. This problem is complete for the class APEPP that corresponds to explicit constructions of objects whose existence follows from the probabilistic method (Korten, FOCS 2021).

Motivated by applications in explicit constructions and complexity theory, we initiate the study of the range avoidance problem for weak circuit classes, and obtain the following results:

1. Generalising Williams's connections between circuit-analysis algorithms and circuit lower bounds (J. ACM 2014), we present a framework for solving C-Avoid in $FP^{NP}$ using circuit-analysis data structures for C, for "typical" multi-output circuit classes C. As an application, we present a non-trivial $FP^{NP}$ range avoidance algorithm for De Morgan formulas.
An important technical ingredient is a construction of rectangular PCPs of proximity, building on the rectangular PCPs by Bhangale, Harsha, Paradise, and Tal (FOCS 2020).

2. Using the above framework, we show that circuit lower bounds for $E^{NP}$ are equivalent to circuit-analysis algorithms with $E^{NP}$ preprocessing. This is the first equivalence result regarding circuit lower bounds for $E^{NP}$. Our equivalences have the additional advantages that they work in both infinitely-often and almost-everywhere settings, and that they also hold for larger (e.g., subexponential) size bounds.

3. Complementing the above results, we show that in some settings, solving C-Avoid would imply breakthrough lower bounds, even for very weak circuit classes C. In particular, an algorithm for $AC^0$-Avoid with polynomial stretch (i.e., $\ell = poly(n)$) implies lower bounds against $NC^1$, and an algorithm for $NC^0_4$-Avoid with very small stretch (i.e., $\ell = n + n^{o(1)}$) implies lower bounds against $NC^1$ and branching programs.

4. We show that Avoid is in FNP if and only if there is a propositional proof system that breaks every non-uniform proof complexity generator. This result connects the study of range avoidance with fundamental questions in proof complexity.

ISSN 1433-8092 | Imprint


text:
[Paper] Language-agnostic BERT Sentence Embedding

Aug 19, 2020 · 959 words · 5 minute read nlp sentence-embedding paper

This post on Google AI Blog explains the premise, background, and related works of this paper pretty well. I’m not going to repeat them in this post. Instead, I’ll try to fill in some of the gaps I see as someone that is familiar with this topic but does not follow very closely with the latest development.

Firstly, I want to point out something in the Google AI post that confuses me. In the first paragraph the authors stated:

While these existing multilingual approaches yield good overall performance across a number of languages, they often underperform on high-resource languages compared to dedicated bilingual models, which can leverage approaches like translation ranking tasks with translation pairs as training data to obtain more closely aligned representations. [emphasis mine]

But in the result table, we don’t see any improvement over LASER[2] in the 14 high-resource language group:

Maybe they just want to mention a general characteristic of multilingual approaches. Nonetheless, the improvements in the low resource languages are significant and might be attributed to the fine-tuning task, the improved capacity of the model (LASER uses at most 5 Bi-LSTM layers), or the larger pre-train dataset.

The LaBSE Model

Datasets

The monolingual data was collected from CommonCrawl and Wikipedia.

The translation corpus is constructed from the web pages using a bitext mining system similar to the approach described in Uszkoreit et al. (2010).

MLM(masked language model) and TLM(translation language modeling) are very common in recent NLP research. In case you forgot the details (like I did with the TLM):

Basically, TLM is to throw in a pair of parallel sentences, randomly mask some tokens, and hope that the model will use information in its counterpart sentence to fill in the correct token.

Getting sentence embeddings

Sentence embeddings are extracted from the last hidden state of the encoder [CLS] token.[1] This is in contrast with the pooling methods used in Sentence-BERT[4]:

I did not see any similar ablation study in [1] and its predecessor [5]. Maybe this is something that can be tuned to further improve accuracy.

(As the Google AI Blog describes, the fine-tuning task is the translation ranking task. The objective is to find the true translation over a collection of sentences in the target language.)

The paper used bidirectional dual encoders with additive margin softmax loss with in-batch negative sampling:

The paper used $\phi(x, y) = cosine(x, y)$ as the embedding space similarity function. A margin $m$ is used on the ground-truth pair to improve separation between translations and non-translations[5]:

Because the translation is bi-directional, the loss is averaged over the two directions:

$$\overline{L} = L + L'$$

Note that the negative sampling is in-batch(i.e. taken from within the batch), so a large batch size is required as in contrastive learning of visual representations[6]. The paper introduced Cross-Accelerator Negative Sampling to do negative sampling across distributed accelerators:

This constraint implies that you will likely not able to get good performance training on only one GPU or even one TPU device.

The LaBSE outperforms bilingual models on the BUCC mining task and the UN parallel sentence retrieval task. Maybe this is the confusing statement of the Google AI Blog post is about.

Initialize Weights from Multilingual BERT

This approach is to initialize weights from the multilingual BERT model and then fine-tune as bidirectional dual encoders like before. The resulting model will perform well on high resource languages but poorly on low resource ones.

Our pre-training approach improves over multilingual BERT on tail languages due to a combination of reasons. We use a much larger vocab , 500k versus 30K, which has been shown to improve multilingual performance (Conneau et al., 2019). We also include TLM in addition to MLM as this has been shown to improve cross-lingual transfer (Conneau and Lample, 2019). Finally, we pretrain on common crawl which is much larger, albeit noisier, than the wiki data multilingual BERT is trained on. [emphasis mine]

Using the Pre-trained Model

Because of the batch size constraint, we probably won’t be able to train the model from scratch or even further fine-tune on the dual encoder task without a large distributed training environment. In most cases, we’d directly use the pre-trained model released by the paper authors, which is available on TF Hub with code examples: LaBSE.

I’d love to see the model get ported to the huggingface/transformers package, which is pretty much the standard package for transformer models nowadays. It’ll make it easier to fine-tune the model on other tasks.

Here’s my thought on how to port the weights: There’s already a script exported weights from TF SavedModel to TF checkpoint. The next step should be to load the checkpoint in huggingface/transformers. Then you can save the weights using the huggingface/transformers API so it can be used by both TensorFlow and PyTorch.

Currently, I don’t need this kind of fine-tuning. So I’ll wait for someone else to do the porting.

References

1. Feng, F., Yang, Y., Cer, D., Arivazhagan, N., & Wang, W. (2020). Language-agnostic BERT Sentence Embedding.
2. Mikel Artetxe and Holger Schwenk. 2019b. Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond. Trans. Assoc. Comput. Linguistics, 7:597–610.
3. Lample, G., & Conneau, A. (2019). Cross-lingual Language Model Pretraining.
4. Reimers, N., & Gurevych, I. (2019). Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks.
5. Yang, Y., Abrego, G. H., Yuan, S., Guo, M., Shen, Q., Cer, D., … Kurzweil, R. (2019). Improving multilingual sentence embedding using bi-directional dual encoder with additive margin softmax. IJCAI International Joint Conference on Artificial Intelligence, 2019-August, 5370–5378.
6. Chen, T., Kornblith, S., Norouzi, M., & Hinton, G. (2019). A Simple Framework for Contrastive Learning of Visual Representations.
tweet Share


text:
Share

# Find the Mean of Each of the Following Frequency Distributions: (5 - 14) - CBSE Class 10 - Mathematics

#### Question

Find the mean of each of the following frequency distributions: (5 - 14)

 Class interval 0 - 6 6 - 12 12 - 18 18 - 24 24 - 30 Frequency 6 8 10 9 7

#### Solution

Let a assume mean be 15

 Class interval Mid-value(x1) d1 = x1 - 15 "u"_1=(x_1-15)/6 f1 f1u1 0 - 6 3 -12 -2 6 -12 6 - 12 9 -6 -1 2 -8 12 - 18 15 0 0 10 0 18 - 24 21 6 1 9 9 24 - 30 27 12 2 7 14 N = 40 sumf_1"u"_1=3

A = 15, h = 5

Mean =A = hxx(sumf_1"u"_1)/N

=15+6xx3/40

= 15 + 18/40

= 15 + 0.45

= 15.45

Is there an error in this question or solution?

#### Video TutorialsVIEW ALL [6]

Solution Find the Mean of Each of the Following Frequency Distributions: (5 - 14) Concept: Mean of Grouped Data.
S


text:
contractible.tex 33.3 KB
 Leonard Guetta committed Jan 21, 2021 1 2 3 \chapter{Homology of contractible \texorpdfstring{$\oo$}{ω}-categories and its consequences} \chaptermark{Contractible $\omega$-categories and consequences}  Leonard Guetta committed Oct 22, 2020 4 \section{Contractible \texorpdfstring{$\oo$}{ω}-categories}  5 Recall that for every $\oo$\nbd{}category $C$, we write $p_C : C \to \sD_0$ for the canonical morphism to the terminal object of $\sD_0$.  Leonard Guetta committed Sep 17, 2020 6 \begin{definition}\label{def:contractible}  Leonard Guetta committed Oct 01, 2020 7  An $\oo$\nbd{}category $C$ is \emph{oplax contractible} when the canonical morphism $p_C : C \to \sD_0$ is an oplax homotopy equivalence (Definition \ref{def:oplaxhmtpyequiv}).  Leonard Guetta committed Sep 17, 2020 8 9 10 11 12 13 14 15 16  %% there exists an object $x_0$ of $X$ and an oplax transformation %% $%% \begin{tikzcd} %% X \ar[r,"p_X"] \ar[rd,"1_X"',""{name=A,above}]& \sD_0 \ar[d,"\langle x_0 \rangle"]\\ %% &X. %% \ar[from=A,to=1-2,"\alpha",Rightarrow] %% \end{tikzcd} %%$  Leonard Guetta committed Jun 01, 2020 17 \end{definition}  Leonard Guetta committed Sep 17, 2020 18 19 20  %% \begin{paragr}  Leonard Guetta committed Oct 02, 2020 21 %% In other words, an $\oo$\nbd{}category $X$ is contractible when there exists an object $x_0$ of $X$ such that $\langle x_0 \rangle : \sD_0 \to X$ is a deformation retract (Paragraph \ref{paragr:defrtract}). It follows from Lemma \ref{lemma:oplaxloc} that $p_X : X \to \sD_0$ is a Thomason equivalence. In particular, we have the following lemma.  Leonard Guetta committed Sep 17, 2020 22 23 24 %% \end{paragr} %% \begin{lemma}\label{lemma:hmlgycontractible}  Leonard Guetta committed Oct 01, 2020 25 %% Let $X$ be a contractible $\oo$\nbd{}category. The morphism of $\ho(\Ch)$  Leonard Guetta committed Sep 17, 2020 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 %% $%% \sH(X) \to \sH(\sD_0) %%$ %% induced by the canonical morphism $p_X : X \to \sD_0$ is an isomorphism. %% \end{lemma} %% \begin{paragr} %% In addition to the previous result, it is immediate to check that $\sH(\sD_0)$ is nothing but $\mathbb{Z}$ seen as an object of $\ho(\Ch)$ concentrated in degree $0$. %% \end{paragr} %% \begin{corollary} %% Let $u : X \to Y$ be a morphism of $\oo\Cat$. If $u$ is a homotopy equivalence (Paragraph \ref{paragr:hmtpyequiv}), then %% $%% \sH^{\pol}(\gamma_{\folk}(u)) %%$ %% is an isomorphism. %% \end{corollary} %% \todo{Expliquer p-e pourquoi le corollaire précédent est important.} %% \begin{corollary}\label{cor:hmlgypolcontractible} %% Let $X$ be an $\oo$-category. If $X$ is contractible, then the morphism %% $%% \sH^{\pol}(\gamma_{\folk}(p_X)) : \sH^{\pol}(X) \to \sH^{\pol}(\sD_0) %%$ %% is an isomorphism of $\ho(\Ch)$. %% \end{corollary} %% We can now prove the main result of this section. \begin{proposition}\label{prop:contractibleisgood}  Leonard Guetta committed Oct 01, 2020 52  Every oplax contractible $\oo$\nbd{}category $C$ is \good{} and we have  Leonard Guetta committed Jun 03, 2020 53  $ Leonard Guetta committed Sep 17, 2020 54  \sH^{\pol}(C)\simeq \sH^{\sing}(C)\simeq \mathbb{Z}  Leonard Guetta committed Jun 03, 2020 55 $  Leonard Guetta committed Sep 17, 2020 56  where $\mathbb{Z}$ is seen as an object of $\ho(\Ch)$ concentrated in degree $0$.  Leonard Guetta committed Jun 03, 2020 57 58 \end{proposition} \begin{proof}  Leonard Guetta committed Sep 17, 2020 59 Consider the commutative square  Leonard Guetta committed Jun 03, 2020 60 61  $\begin{tikzcd}  Leonard Guetta committed Oct 25, 2020 62 63  \sH^{\pol}(C) \ar[d,"\sH^{\pol}(p_C)"] \ar[r,"\pi_C"] & \sH^{\sing}(C) \ar[d,"\sH^{\sing}(p_C)"] \\ \sH^{\pol}(\sD_0) \ar[r,"\pi_{\sS_0}"] & \sH^{\sing}(\sD_0).  Leonard Guetta committed Jun 03, 2020 64 65  \end{tikzcd}$  Leonard Guetta committed Dec 27, 2020 66 67 68 69 70 71 72  It follows respectively from Proposition \ref{prop:oplaxhmtpyisthom} and Proposition \ref{prop:oplaxhmtpypolhmlgy} that the right and left vertical morphisms of the above square are isomorphisms. Then, an immediate computation left to the reader shows that $\sD_0$ is \good{} and that $\sH^{\pol}(\sD_0)\simeq \sH^{\sing}(\sD_0)\simeq \mathbb{Z}$. By a 2-out-of-3 property, we deduce that $\pi_C : \sH^{\sing}(C)\to \sH^{\pol}(C)$ is an isomorphism and $\sH^{\pol}(C)\simeq \sH^{\sing}(C)\simeq \mathbb{Z}$.  Leonard Guetta committed Jun 03, 2020 73 \end{proof}  Leonard Guetta committed Sep 17, 2020 74 \begin{remark}  Leonard Guetta committed Oct 01, 2020 75  Definition \ref{def:contractible} admits an obvious lax'' variation and Proposition \ref{prop:contractibleisgood} is also true for lax contractible $\oo$\nbd{}categories.  Leonard Guetta committed Sep 17, 2020 76  \end{remark}  Leonard Guetta committed Dec 27, 2020 77 We end this section with an important result on slice $\oo$\nbd{}categories (Paragraph \ref{paragr:slices}).  Leonard Guetta committed Jun 09, 2020 78 \begin{proposition}\label{prop:slicecontractible}  Leonard Guetta committed Oct 01, 2020 79  Let $A$ be an $\oo$\nbd{}category and $a_0$ an object of $A$. The $\oo$\nbd{}category $A/a_0$ is oplax contractible.  Leonard Guetta committed Jun 03, 2020 80 81  \end{proposition} \begin{proof}  Leonard Guetta committed Sep 28, 2020 82  This follows from the dual of \cite[Proposition 5.22]{ara2020theoreme}.  Leonard Guetta committed Jun 03, 2020 83 84  \end{proof} \section{Homology of globes and spheres}  85 \begin{lemma}\label{lemma:globescontractible}  Leonard Guetta committed Oct 02, 2020 86  For every $n \in \mathbb{N}$, the $\oo$\nbd{}category $\sD_n$ is oplax contractible.  Leonard Guetta committed Jun 03, 2020 87 88 \end{lemma} \begin{proof}  Leonard Guetta committed Oct 03, 2020 89  Recall that we write $e_n$ for the unique non-trivial $n$\nbd{}cell of $\sD_n$ and that by definition $\sD_n$ has exactly two non-trivial $k$\nbd{}cells for every $k$ such that $0\leq kn$:] Since $\sS_n$ is an $n$\nbd{}category, the image of $\alpha_k$ is necessarily of the form $\varphi(\alpha_k)=\1^k_{x}$ with $x$ a cell of $\sS_n$ of dimension non-greater than $n$. If $x$ is a unit on a cell whose dimension is strictly lower than $n$, then everything works like in the case $k0. \] \emph{From now on, let us use the convention that$\trgt_0(x)=x$when$x$is a$0$\nbd{}cell of$X$}. When$n>0$, the source and target of an$n$\nbd{}cell$(x,p)$of$X/a$are given by  Leonard Guetta committed Jun 09, 2020 326  $ 327  \src((x,p))=(\src(x),p) \text{ and } \trgt((x,p))=(\trgt(x),p).  Leonard Guetta committed Jan 07, 2021 328 329 330 $ %% LA DESCRIPTION DU BUT AU DESSUS N'EST PAS BONNE POUR LA DIMENSION 1 %% A CORRIGER !!  331  Moreover, the$\oo$\nbd{}functor$f/a$is described as  Leonard Guetta committed Jun 09, 2020 332 333 334  $(x,p) \mapsto (f(x),p),$  Leonard Guetta committed Dec 27, 2020 335  and the canonical$\oo$\nbd{}functor$X/a \to X$as  Leonard Guetta committed Jun 09, 2020 336 337 338  $(x,p) \mapsto x.$  Leonard Guetta committed Jun 01, 2020 339 \end{paragr}  Leonard Guetta committed Jun 09, 2020 340 \begin{paragr}\label{paragr:unfolding}  341  Let$f : X \to A$be an$\oo$\nbd{}functor with$A$a$1$\nbd{}category. Every arrow$\beta : a \to a'$of$A$induces an$\oo\nbd{}functor  342  \begin{align*}  343  X/\beta : X/a &\to X/{a'} \\  Leonard Guetta committed Jun 09, 2020 344  (x,p) & \mapsto (x,\beta \circ p),  345  \end{align*}  Leonard Guetta committed Dec 27, 2020 346  which takes part in a commutative triangle  Leonard Guetta committed Jun 09, 2020 347 348  $\begin{tikzcd}[column sep=tiny]  349  X/{a} \ar[rr,"X/{\beta}"] \ar[dr] && X/{a'} \ar[dl] \\  Leonard Guetta committed Oct 14, 2020 350 351  &X&. \end{tikzcd}  Leonard Guetta committed Jun 09, 2020 352 353 354 $ This defines a functor \begin{align*}  355  X/{-} : A &\to \oo\Cat\\  356  a &\mapsto X/a  Leonard Guetta committed Jun 09, 2020 357  \end{align*}  Leonard Guetta committed Oct 25, 2020 358  and a canonical\oo$\nbd{}functor  Leonard Guetta committed Jun 09, 2020 359  $ 360  \colim_{a \in A} (X/{a}) \to X.  Leonard Guetta committed Jun 09, 2020 361 $  Leonard Guetta committed Nov 04, 2020 362  Let$f' : X' \to A$be another$\oo$\nbd{}functor and let  Leonard Guetta committed Jun 09, 2020 363 364  $\begin{tikzcd}  365  X \ar[rr,"g"] \ar[dr,"f"'] && X' \ar[dl,"f'"] \\  Leonard Guetta committed Jun 09, 2020 366 367 368  &A& \end{tikzcd}$  369  be a commutative triangle in$\oo\Cat$. Recall from \ref{paragr:slices} that for every object$a$of$A$, there is an$\oo$\nbd{}functor$g/adefined as  Leonard Guetta committed Jun 09, 2020 370  \begin{align*}  371 372  g/a : X/a &\to X'/a \\ (x,p) &\mapsto (g(x),p).  Leonard Guetta committed Jun 09, 2020 373  \end{align*}  374 375 376  This defines a natural transformation $g/- : X/- \Rightarrow X'/-,$ and thus induces an\oo$\nbd{}functor  Leonard Guetta committed Jun 09, 2020 377  $ 378  \colim_{a \in A}(X/a) \to \colim_{a \in A}(X'/a).  Leonard Guetta committed Jun 09, 2020 379 $  380  Furthermore, it is immediate to check that the square  Leonard Guetta committed Jun 09, 2020 381 382  $\begin{tikzcd}  383 384  \displaystyle \colim_{a \in A}(X/a) \ar[d] \ar[r] & X \ar[d,"g"] \\ \displaystyle\colim_{a \in A}(X'/a) \ar[r] & X',  Leonard Guetta committed Oct 14, 2020 385  \end{tikzcd}  Leonard Guetta committed Jun 09, 2020 386 387 388 $ is commutative. \end{paragr}  389 \begin{lemma}\label{lemma:colimslice}  390  Let$f : X \to A$be an$\oo$\nbd{}functor such that$A$is a$1$\nbd{}category. The canonical$\oo$\nbd{}functor  Leonard Guetta committed Jun 09, 2020 391  $ 392  \colim_{a \in A}(X/a) \to X  Leonard Guetta committed Jun 09, 2020 393 394 395 396 $ is an isomorphism. \end{lemma} \begin{proof}  397 398  We have to show that the cocone $ 399  (X/a \to X)_{a \in \Ob(A)}  400 401 402 403 $ is colimiting. Let $ 404  (\phi_{a} : X/a \to C)_{a \in \Ob(A)}  405 $  Leonard Guetta committed Oct 01, 2020 406  be another cocone and let$x$be a$n$\nbd{}arrow of$X$. Notice that the pair  407 408 409  $(x,1_{f(\trgt_0(x))})$  Leonard Guetta committed Oct 25, 2020 410  is a$n$\nbd{}arrow of$X/f(\trgt_0(x)). We leave it to the reader to check that the formula  411 412 \begin{align*} \phi : X &\to C \\  413  x &\mapsto \phi_{f(\trgt_0(x))}(x,1_{f(\trgt_0(x))}).  414  \end{align*}  415  defines an\oo$\nbd{}functor and it is straightforward to check that for every object$a$of$A$the triangle  416 417  $\begin{tikzcd}  418  X/a\ar[dr,"\phi_{a}"']\ar[r] & X \ar[d,"\phi"] \\  419 420 421  & C \end{tikzcd}$  422 423  is commutative. This proves the existence part of the universal property.  Leonard Guetta committed Nov 04, 2020 424  Now let$\phi' : X \to C$be another$\oo$\nbd{}functor that makes the previous triangles commute for every object$a$of$A$and let$x$be an$n$\nbd{}cell of$X$. Since the triangle  425 426  $\begin{tikzcd}  427  X/f(\trgt_0(x)) \ar[dr,"\phi_{f(\trgt_0(x))}"']\ar[r] & X \ar[d,"\phi'"] \\  428 429 430 431 432  & C \end{tikzcd}$ is commutative, we necessarily have $ 433  \phi'(x)=\phi_{f(\trgt_0(x))}(x,1_{f(\trgt_0(x))})  434 435 $ which proves that$\phi'=\phi$.  Leonard Guetta committed Jun 09, 2020 436 437 \end{proof} \begin{paragr}  438  In particular, when we apply the previous lemma to$\mathrm{id}_A : A \to A$,  439  we obtain that every$1$\nbd{}category$A$is (canonically isomorphic to) the colimit  Leonard Guetta committed Jun 09, 2020 440  $ 441  \colim_{a \in A} (A/a).  Leonard Guetta committed Jan 05, 2021 442 443 444 $ % In other words, this simply say that the colimit of the Yoneda embedding$A \to % \Psh{A}$is the terminal presheaves  445  We now proceed to prove that this colimit is homotopic with respect to  446  the folk weak equivalences.  Leonard Guetta committed Jun 09, 2020 447 \end{paragr}  Leonard Guetta committed Oct 01, 2020 448 Up to Lemma \ref{lemma:basisofslice}, we fix once and for all an$\oo$\nbd{}functor$f : X \to A$with$A$a$1$\nbd{}category.  449 \begin{lemma}\label{lemma:sliceisfree}  450 451 452  If$X$is free, then for every object$a$of$A$, the$\oo$\nbd{}category$X/a$is free. More precisely, if$\Sigma^X_n$is the$n$\nbd{}basis of$X$, then the$n$\nbd{}basis of$X/a$is the set  Leonard Guetta committed Jun 09, 2020 453  $ 454  \Sigma^{X/a}_n := \{(x,p) \in (X/a)_n \vert x \in \Sigma^X_n \}.  Leonard Guetta committed Jun 09, 2020 455 456 457 $ \end{lemma} \begin{proof}  458  It is immediate to check that for every object$a$of$A$, the canonical  Leonard Guetta committed Dec 27, 2020 459  forgetful functor$\pi_{a} : A/a \to A$is a discrete Conduché functor (see Section  460  \ref{section:conduche}). Hence, from Lemma \ref{lemma:pullbackconduche} we  461  know that$X/a \to X$is a discrete Conduché$\oo$\nbd{}functor. The result follows  462  then from Theorem \ref{thm:conduche}.  Leonard Guetta committed Jun 09, 2020 463 464 \end{proof} \begin{paragr}  465  When$X$is free, every arrow$\beta : a \to a'$of$Ainduces a map  Leonard Guetta committed Jun 09, 2020 466  \begin{align*}  467  \Sigma^{X/a}_n &\to \Sigma^{X/a'}_n \\  Leonard Guetta committed Jun 09, 2020 468 469 470 471 472  (x,p) &\mapsto (x,\beta\circ p). \end{align*} This defines a functor \begin{align*} \Sigma^{X/{\shortminus}}_n : A &\to \Set \\  473  a &\mapsto \Sigma^{X/a}_n.  Leonard Guetta committed Jun 09, 2020 474 475  \end{align*} \end{paragr}  476 \begin{lemma}\label{lemma:basisofslice}  Leonard Guetta committed Sep 30, 2020 477  IfX$is free, then there is an isomorphism of functors  Leonard Guetta committed Jun 09, 2020 478  $ 479  \Sigma^{X/\shortminus}_n \simeq \coprod_{x \in \Sigma^X_n}\Hom_A\left(f(\trgt_0(x)),\shortminus\right).  Leonard Guetta committed Jun 09, 2020 480 481 482 $ \end{lemma} \begin{proof}  483  For every object$a$of$A$and every$x \in \Sigma_n^X, we have a canonical map  Leonard Guetta committed Jun 09, 2020 484  \begin{align*}  485  \Hom_A\left(f(\trgt_0(x)),a\right) &\to \Sigma^{X/a}_n \\  Leonard Guetta committed Jun 09, 2020 486 487 488 489  p &\mapsto (x,p). \end{align*} By universal property, this induces a map $ Leonard Guetta committed Dec 27, 2020 490  \coprod_{x \in \Sigma^X_n}\Hom_A\left(f(\trgt_0(x)),a\right) \to \Sigma^{X/a}_n,  Leonard Guetta committed Jun 09, 2020 491 $  492  which is natural ina$. A simple verification shows that it is a bijection.  Leonard Guetta committed Jun 09, 2020 493 \end{proof}  494 \begin{proposition}\label{prop:sliceiscofibrant}  Leonard Guetta committed Oct 25, 2020 495  Let$A$be a$1$\nbd{}category,$X$be a free$\oo$\nbd{}category and$f : X \to A$be an$\oo\nbd{}functor. The functor  Leonard Guetta committed Jun 13, 2020 496 497  \begin{align*} A &\to \oo\Cat \\  498  a &\mapsto X/a  Leonard Guetta committed Jun 13, 2020 499  \end{align*}  500 501  is a cofibrant object for the projective model structure on\oo\Cat(A)$induced by the folk model structure on$\oo\Cat$(\ref{paragr:projmod}).  Leonard Guetta committed Jun 09, 2020 502 \end{proposition}  Leonard Guetta committed Jun 13, 2020 503 \begin{proof}  504 505 506 507  Recall that the set $\{i_n: \sS_{n-1} \to \sD_n \vert n \in \mathbb{N} \}$  Leonard Guetta committed Dec 27, 2020 508  is a set of generating folk cofibrations.  509  From Lemmas \ref{lemma:sliceisfree} and \ref{lemma:basisofslice} we deduce  510  that for every object$a$of$A$and every$n \in \mathbb{N}$, the canonical square  511 512  $\begin{tikzcd}  513 514  \displaystyle\coprod_{x \in \Sigma^X_n}\coprod_{\Hom_A(f(\trgt_0(x)),a)}\sS_{n-1} \ar[r] \ar[d] & \sk_{n-1}(X/a) \ar[d]\\ \displaystyle\coprod_{x \in \Sigma^X_n}\coprod_{\Hom_A(f(\trgt_0(x)),a)}\sD_n \ar[r]& \sk_n{(X/a)}  515 516 517  \end{tikzcd}$ is cocartesian. It is straightforward to check that this square is natural in  518 $a$in an obvious sense, which means that we have a cocartesian square in$\oo\Cat(A)$:  Leonard Guetta committed Oct 12, 2020 519 520  $\begin{tikzcd}  Leonard Guetta committed Oct 25, 2020 521 522  \displaystyle\coprod_{x \in \Sigma^X_n}\sS_{n-1}\otimes f(\trgt_0(x)) \ar[r] \ar[d] & \sk_{n-1}(X/-) \ar[d]\\ \displaystyle\coprod_{x \in \Sigma^X_n}\sD_n\otimes f(\trgt_0(x)) \ar[r]& \sk_n{(X/-)}  Leonard Guetta committed Oct 13, 2020 523  \ar[from=1-1,to=2-2,phantom,"\ulcorner",very near end]  Leonard Guetta committed Oct 12, 2020 524 525  \end{tikzcd}$  Leonard Guetta committed Oct 25, 2020 526  (see \ref{paragr:cofprojms} for notations). From the second part of Proposition \ref{prop:modprs}, we deduce that for every$n\geq 0$, $\sk_{n-1}(X/-) \to \sk_{n}(X/-)$ is a cofibration for the  Leonard Guetta committed Oct 12, 2020 527 528  projective model structure on$\oo\Cat(A)$. Thus, the transfinite composition $ Leonard Guetta committed Oct 13, 2020 529  \emptyset \to \sk_{0}(X/-) \to \sk_{1}(X/) \to \cdots \to \sk_{n}(X/-) \to \cdots,  Leonard Guetta committed Oct 12, 2020 530 $  Leonard Guetta committed Oct 13, 2020 531  which is canonically isomorphic to$\emptyset \to X/-$(see Lemma \ref{lemma:filtration}), is also a cofibration for the projective model structure.  Leonard Guetta committed Jun 13, 2020 532 \end{proof}  Leonard Guetta committed Oct 01, 2020 533 \begin{corollary}\label{cor:folkhmtpycol}  Leonard Guetta committed Oct 25, 2020 534  Let$A$be a$1$\nbd{}category and$f : X \to A$be an$\oo$\nbd{}functor. The canonical arrow of$\ho(\oo\Cat^{\folk})$ Leonard Guetta committed Jun 13, 2020 535  $ 536  \hocolim^{\folk}_{a \in A}(X/a) \to X,  Leonard Guetta committed Jun 13, 2020 537 $  538  induced by the co-cone$(X/a \to X)_{a \in \Ob(A)}$, is an isomorphism.  Leonard Guetta committed Jun 13, 2020 539 540 541 \end{corollary} Beware that in the previous corollary, we did \emph{not} suppose that$X$was free. \begin{proof}  542  Let$P$be a free$\omega$-category and$g : P \to X$a folk trivial fibration  Leonard Guetta committed Jan 05, 2021 543  and consider the following commutative diagram of$\ho(\oo\Cat^{\folk})$ 544 545  \label{comsquare} \begin{tikzcd}  Leonard Guetta committed Jan 05, 2021 546 547  \displaystyle\hocolim^{\folk}_{a \in A}(P/a) \ar[d] \ar[r] & \displaystyle\colim_{a \in A}(P/a) \ar[d] \ar[r] & P \ar[d]\\ \displaystyle\hocolim^{\folk}_{a \in A}(X/a) \ar[r] & \displaystyle\colim_{a \in A}(X/a) \ar[r] & X  548 549  \end{tikzcd}  Leonard Guetta committed Jan 05, 2021 550  where the middle and most left vertical arrows are induced by the arrows  551  $ Leonard Guetta committed Jan 05, 2021 552  g/a : P/a \to X/a,  553 $  Leonard Guetta committed Jan 05, 2021 554 555 556  and the most right vertical arrow is induced by$g$. Since trivial fibrations are stable by pullback,$g/a$is a trivial fibration. This proves that the most left vertical arrow of diagram \eqref{comsquare} is an isomorphism.  557   Leonard Guetta committed Jan 07, 2021 558  Now, from Proposition \ref{prop:sliceiscofibrant} and Corollary  Leonard Guetta committed Jan 05, 2021 559 560 561 562  \ref{cor:cofprojms}, we deduce that the arrow $\hocolim_{a \in A}^{\folk}(P/a)\to \colim_{a \in A}(P/a)$ is an isomorphism. Moreover, from Lemma \ref{lemma:colimslice}, we know that the arrows $\colim_{a \in A}(P/a)\to P$ and $\colim_{a \in A}(X/a)\to X$ are isomorphisms.  563   Leonard Guetta committed Jan 05, 2021 564 565 566 567 568  Finally, since$g$is a folk weak equivalence, the most right vertical arrow of diagram \eqref{comsquare} is an isomorphism and by an immediate 2-out-of-3 property this proves that all arrows of \eqref{comsquare} are isomorphisms. In particular, so is the composition of the two bottom horizontal arrows, which is what we desired to show.  Leonard Guetta committed Jun 13, 2020 569 \end{proof}  570 We now move on to the next step needed to prove that every$1$\nbd{}category is \good{}. For that purpose, let us recall a construction commonly referred to as the Grothendieck construction''.  Leonard Guetta committed Jun 13, 2020 571 \begin{paragr}  572  Let$A$be a$1$\nbd{}category and$F : A \to \Cat$a functor. We denote by$\int F$or$\int_{a \in A}F(a)$the category such that:  Leonard Guetta committed Oct 02, 2020 573  \begin{itemize}[label=-]  Leonard Guetta committed Jun 13, 2020 574 575 576 577 578 579 580 581 582 583  \item An object of$\int F$is a pair$(a,x)$where$a$is an object of$A$and$x$is an object of$F(a)$. \item An arrow$(a,x) \to (a',x')$of$\int F$is a pair$(f,k)$where $f : a \to a'$ is an arrow of$A$, and $k : F(f)(x) \to x'.$ \end{itemize}  Leonard Guetta committed Oct 25, 2020 584  The unit on$(a,x)$is the pair$(1_a,1_x)$and the composition of$(f,k) : (a,x) \to (a',x')$and$(f',k') : (a',x') \to (a'',x'')is given by:  Leonard Guetta committed Jun 13, 2020 585 586 587  $(f',k')\circ(f,k)=(f'\circ f,k'\circ F(f')(k)).$  Leonard Guetta committed Oct 02, 2020 588  Every natural transformation  Leonard Guetta committed Jun 13, 2020 589 590  $\begin{tikzcd}  Leonard Guetta committed Oct 02, 2020 591  A \ar[r,bend left,"F",""{name=A,below},pos=19/30]\ar[r,bend right,"G"',""{name=B, above},pos=11/20] & \Cat \ar[from=A,to=B,Rightarrow,"\alpha",pos=9/20]  Leonard Guetta committed Jun 13, 2020 592 593 594 595 596 597 598  \end{tikzcd}$ induces a functor \begin{align*} \int \alpha : \int F &\to \int G\\ (a,x) &\mapsto (a,\alpha_a(x)). \end{align*}  Leonard Guetta committed Oct 02, 2020 599  Altogether, this defines a functor  Leonard Guetta committed Jun 13, 2020 600 601 602 603 604 605  \begin{align*} \int : \Cat(A)&\to \Cat \\ F&\mapsto \int F, \end{align*} where\Cat(A)$is the category of functors from$A$to$\Cat$. \end{paragr}  606 We now recall an important theorem due to Thomason.  Leonard Guetta committed Jun 13, 2020 607 \begin{theorem}[Thomason]\label{thm:Thomason}  608  The functor$\int : \Cat(A) \to \Cat$sends the pointwise Thomason equivalences (\ref{paragr:homder}) to Thomason equivalences and the induced functor  Leonard Guetta committed Jun 13, 2020 609 610 611 612 613  $\overline{\int} : \ho(\Cat^{\Th}(A)) \to \ho(\Cat^{\Th})$ is canonically isomorphic to the homotopy colimit functor $ Leonard Guetta committed Nov 04, 2020 614  \hocolim^{\Th}_A : \ho(\Cat^{\Th}(A)) \to \ho(\Cat^{\Th}).  Leonard Guetta committed Jun 13, 2020 615 616 617 618 619 620 $ \end{theorem} \begin{proof} The original source for this Theorem is \cite{thomason1979homotopy}. However, the definition of homotopy colimit used by Thomason, albeit equivalent, is not the same as the one we used in this dissertation and is slightly outdated. A more modern proof of the theorem can be found in \cite[Proposition 2.3.1 and Théorème 1.3.7]{maltsiniotis2005theorie}. \end{proof} \begin{corollary}\label{cor:thomhmtpycol}  621  Let$A$be a$1$\nbd{}category. The canonical map  Leonard Guetta committed Jun 13, 2020 622  $ Leonard Guetta committed Nov 04, 2020 623  \hocolim^{\Th}_{a \in A}(A/a) \to A  Leonard Guetta committed Jun 13, 2020 624 625 626 627 628 629 630 631 $ induced by the co-cone$(A/a \to A)_{a \in \Ob(A)}$, is an isomorphism of$\ho(\Cat^{\Th})$. \end{corollary} \begin{proof} For every object$a$of$A$, the canonical map to the terminal category $A/a \to \sD_0$  Leonard Guetta committed Oct 02, 2020 632  is a Thomason equivalence. This comes from the fact that$A/a$is oplax contractible (Proposition \ref{prop:slicecontractible}), or from \cite[Section 1, Corollary 2]{quillen1973higher} and the fact that$A/a$has a terminal object.  Leonard Guetta committed Jun 13, 2020 633 634 635 636 637  In particular, the morphism of functors $A/(-) \Rightarrow k_{\sD_0},$  Leonard Guetta committed Oct 02, 2020 638  where$k_{\sD_0}$is the constant functor$A \to \Cat$with value the terminal category$\sD_0$, is a pointwise Thomason equivalence. It follows from the first part of Theorem \ref{thm:Thomason} that  Leonard Guetta committed Jun 13, 2020 639 640 641  $\int_{a \in A}A/a \to \int_{a \in A}k_{\sD_0}$  Leonard Guetta committed Nov 04, 2020 642  is a Thomason equivalence and an immediate computation shows that $\int_{a \in A}k_{\sD_0} \simeq A.$ From the second part of Theorem \ref{thm:Thomason}, we have that  Leonard Guetta committed Jun 13, 2020 643  $ Leonard Guetta committed Nov 04, 2020 644  \hocolim^{\Th}_{a \in A}(A/a) \simeq A.  Leonard Guetta committed Jun 13, 2020 645 $  646  A thorough analysis of all the isomorphisms involved shows that this last isomorphism is indeed induced by the co-cone$(A/a \to A)_{a \in \Ob(A)}$.  Leonard Guetta committed Jun 13, 2020 647 648 \end{proof} \begin{remark}  Leonard Guetta committed Nov 04, 2020 649  It is possible to extend the previous corollary to prove that for every functor$f : X \to A$($X$and$A$being$1$\nbd{}categories), we have $\hocolim^{\Th}_{a \in A} (X/a) \simeq X.$ However, to prove that it is also the case when$X$is an$\oo$\nbd{}category and$f$an$\oo$\nbd{}functor, as in Corollary \ref{cor:folkhmtpycol}, one would need to extend the Grothendieck construction to functors with value in$\oo\Cat$and to prove an$\oo$\nbd{}categorical analogue of Theorem \ref{thm:Thomason}. Such results, while being highly plausible, go beyond the scope of this dissertation.  Leonard Guetta committed Jun 13, 2020 650 651 \end{remark} Putting all the pieces together, we are now able to prove the awaited Theorem.  Leonard Guetta committed Oct 12, 2020 652 \begin{theorem}\label{thm:categoriesaregood}  653  Every$1$\nbd{}category is \good{}.  Leonard Guetta committed Jun 13, 2020 654 655 656 \end{theorem} \begin{proof} All the arguments of the proof have already been given and we sum them up here essentially for the sake of clarity.  657  Let$A$be a$1\nbd{}category. Consider the diagram  Leonard Guetta committed Jun 13, 2020 658 659 660 661 662 663 664 665 666 667 668  \begin{align*} A &\to \oo\Cat\\ a &\mapsto A/a \end{align*} and the co-cone $(A/a \to A)_{a \in \Ob(A)}.$ \begin{itemize}[label=-] \item The canonical map of\ho(\oo\Cat^{\folk})$$ Leonard Guetta committed Oct 04, 2020 669  \hocolim_{a \in A}^{\folk} (A/a) \to A  Leonard Guetta committed Jun 13, 2020 670 671 672 673 $ is an isomorphism thanks to Corollary \ref{cor:folkhmtpycol} applied to$\mathrm{id}_A : A \to A$. \item The canonical map of$\ho(\oo\Cat^{\Th})$$ Leonard Guetta committed Oct 04, 2020 674  \hocolim_{a \in A}^{\Th} (A/a) \to A  Leonard Guetta committed Jun 13, 2020 675 $  Leonard Guetta committed Jan 07, 2021 676 677 678  is an isomorphism thanks to Corollary \ref{cor:thomhmtpycol} and the fact that the canonical morphisms of op-prederivators$\Ho(\Cat^{\Th}) \to \Ho(\oo\Cat^{\Th})$is homotopy cocontinuous (see \ref{paragr:thomhmtpycol}).  679  \item Every$A/a$is \good{} thanks to Proposition \ref{prop:contractibleisgood} and Proposition \ref{prop:slicecontractible}.  Leonard Guetta committed Jun 13, 2020 680 681 682  \end{itemize} Thus, Proposition \ref{prop:criteriongoodcat} applies and this proves that$A\$ is \good{}. \end{proof}  683 684 685 686 687  %%% Local Variables: %%% mode: latex %%% TeX-master: "main" %%% End:


text:
# Self Referential Polynomials

For every given degree $$\n\$$ it is possible to construct (at least one) an integral polynomial $$\p \in \mathbb Z[X]\$$ such that $$\p(k)\$$ ($$\p\$$ evaluated in $$\k\$$) is the coefficient of the term $$\x^k\$$ in the polynomial for all $$\0 \leqslant k \leqslant n\$$. To make them unique, we require the leading coefficient (the coefficient of $$\x^n\$$) to be positive and minimal.

These polynomials have some interesting properties, you can find some references in the thread that inspired me to do this challenge. You can also find those polynomials in https://oeis.org/A103423

One of the a priori unexpected properties is how the roots behave depending on $$\n\$$:

source (by /u/zorngov and /u/EpicSauceSc2)

Given a nonnegative integer $$\n\$$ output the self referential integral polynomial of degree $$\n\$$ with minimal positive leading coefficient.

### Details

The output can be in any human readable form, as string x^2-x-1, or also as a list of coefficients [1,-1,-1]. (The order of the coefficients can also be the other way around, it just needs to be consistent.)

### First few outputs

n=0: 1
n=1: x
n=2: x^2-x-1
n=3: 10*x^3-29*x^2-6*x+19
n=4: 57*x^4-325*x^3+287*x^2+423*x-19
n=5: 12813*x^5-120862*x^4+291323*x^3+44088*x^2-355855*x-227362

• @LuisMendo Thanks, apparently I'm a fanatic. Jun 1, 2016 at 11:17

# Mathematica, 55 bytes

NullSpace@Table[x^c-Boole[r==c]/.x->r,{r,0,#},{c,0,#}]&

Output is the list coefficients, beginning from the constant term. Example:

In[1084] := Do[Print[%1077[n] // StandardForm], {n, 0, 7}]

{{1}}

{{0,1}}

{{-1,-1,1}}

{{19,-6,-29,10}}

{{-19,423,287,-325,57}}

{{-227362,-355855,44088,291323,-120862,12813}}

{{145991969,64989065,-123338281,-85635661,79841909,-18146731,1286795}}

{{-5958511844199,3384370785404,8437850634901,489428412300,-4499161007143,1776194531596,-258931801371,13131073916}}

This simply finds the vector such that (A - I)v = 0, similar to the MAPLE code in OEIS. The NullSpace method seems to always pick the minimal positive number for the last element, which matches the task description.

The x^c-…/.x->r indirection is to prevent having 0^0 == Indeterminate.

# Sage, 74 bytes

lambda n:kernel(matrix(n+1,[j^-i-(-i==j)for i in[-n..0]for j in[0..n]])).0

The -i and [-n..0] could be i and [0..n], if not for the positive leading coefficient requirement.

Try it on Sage Cell

# Pari/GP, 57 bytes

n->(a=matkerint(matrix(n++,,i,j,i--^j--)-1))*sign(a[n,1])

Try it online!

Returns the coefficients as a column vector.


text:
## Profit and Loss

1. A man bought a book for Rs.450 and sold for Rs.495.Find the gain percent.

A. 620

B. 680

C. 720

D. 750

Explanation:

			S.P. = 495 C.P. = 450

Gain = 495 - 450 = 45

Gain % = $\frac{45}{450}$ $\times$ 100 = 10

$\therefore$ gain% = 10
2. A man bought a cycle for Rs.450 and sold for Rs.405. find the loss percent.

A. 620

B. 680

C. 720

D. 750

Explanation:

			Loss = 450 - 405 = 45

Loss% = $\frac{45}{450}$ $\times$ 100 = 10

$\therefore$ loss% = 10
3. A man bought an object for Rs.750 and sold for 10% gain. Find S.P.

A. 620

B. 680

C. 720

D. 750

Explanation:

			C.P. = 750                                  gain = 10%

S.P. = 750 $\times$ $\frac{100 + 10}{100}$

750 $\times$ $\frac{110}{100}$ = 825

$\therefore$ S.P. = 825
4. A radio is bought for Rs.750 and sold for 4% loss. Find S.P.

A. 620

B. 680

C. 720

D. 750

Explanation:

			C.P. = 750                                          loss = 4%

S.P. = 750 $\times$ $\frac{100 - 4}{100}$

750 $\times$ $\frac{96}{100}$ = 360
5. A chair is sold for Rs.825. gain is 10%. find C.P.

A. 620

B. 680

C. 720

D. 750

			S.P. = 825 gain = 10%
C.P. = 825 $\times$ $\frac{100}{100 + 10}$
825 $\times$ $\frac{100}{110}$ = 750
C.P. = 750


text:
# Filtering out AR(1) effects before using stochastic volatility model

I wonder if I first filter out AR(1) (autoregressive model with lag 1) effects from univariate time series and then fit stochastic volatility model does above procedure introduce any bias at first or second step (first step - fitting AR(1), second step - fitting SV model) ? I'm especially interested in potential bias in fitting AR(1) model. This question have came to my mind after using 'stochvol' R package, where I can't add autoregressive part to stochastic volatility model.

## 1 Answer

Even though it's a straightforward extension, it took me a while (a year? yikes!); but now you can easily incorporate Bayesian ar(1) (or more generally, Bayesian regression) in joint estimation by using designmatrix = "ar(1)" as an argument to svsample. It's not well documented yet (except in the help files), but I nevertheless hope easy to use.

From the help file of svsample:

## Another example, this time with an AR(1) structure for the mean
## Not run:
data(exrates)
y <- exrates\$USD

## Fit AR(1)-SV model to EUR-USD exchange rates
res <- svsample(y, designmatrix = "ar1")

## Use predict.svdraws to obtain predictive volatilities
ahead <- 100
predvol <- predict(res, steps = ahead)

## Use arpredict to obtain draws from the posterior predictive
preddraws <- arpredict(res, predvol)

## Calculate predictive quantiles
predquants <- apply(preddraws, 2, quantile, c(.1, .5, .9))

## Visualize
ts.plot(y, xlim = c(length(y) - ahead, length(y) + ahead),
ylim = range(predquants))
for (i in 1:3) {
lines((length(y) + 1):(length(y) + ahead), predquants[i,],
col = 3, lty = i
}

## End(Not run)

Please let me know if you find any glitches!

• Hi Gregor Kastner, welcome to Quant.SE! Thank you for your contribution :) Oct 14 '15 at 8:30


text:
You can use the $(env ...) substitution arg. So <node pkg="rosbag" type="record" args="-o /home/($env USER)/catkin_ws/src/bagfiles/chatter /chatter" name="record" output="screen"/>

Then again, that user would need to have the directory structure ~/catkin_ws/src/bagfiles/chatter present. I suggest to use something that is definitiely available, i.e. either directly storing into the home directory, or something read-writable by any user...
You can use the $(env ...) substitution arg. So <node pkg="rosbag" type="record" args="-o /home/($env /home/\$(env USER)/catkin_ws/src/bagfiles/chatter /chatter" name="record" output="screen"/>

Then again, that user would need to have the directory structure ~/catkin_ws/src/bagfiles/chatter present. I suggest to use something that is definitiely available, i.e. either directly storing into the home directory, or something read-writable by any user...


text:
# How does distance effect the flow of charges between a capacitor's plate and battery

Consider the simple capacitor-battery system in the image. Assuming the battery above has a potential difference of 9V, where the positive side has potential of 9V and the negative side has potential of zero. My understanding of how charge flows into a capacitor is as follows:

Focusing only on the positive terminal, when we first connecte the plate to the terminal, a difference in potential between the plate and the positive terminal exists, assuming the plate has a potential of 3V with respect to the negative terminal, positive charges will flow from positive terminal to the plate, until the potential in the wire between the plate and the positive terminal is zero (i. e. The plate now has potential of 9V). And if we connect the negative terminal to another plate, the same will happen ( the plate would have a potential of zero with respect to the positive terminal)

The part that really threw me off is how would potential between the plates effect the potential in the wires between the plates and the terminals. For instance, a book said that when the distance between the plates increase, the potential between the plates will also increase (which is understandable considering that potential is equal to electric field times distance), and that this difference will in turn cause a difference in the wire connecting the plate to the terminal, which will cause positive charges to flow from the plate to the positive terminal. But i fail to see how would the difference between plates could effect the difference in the wire. My believe is that the wire has no idea whats going on outside of it, all the wire cares about is maintaining a zero potential difference between the plate and the terminal, which is established through keeping both plate and terminal at the same potential difference with respect to the negative terminal (i. e. Both plate and terminal should have a potential 9V). Can someone please explain how the distance between plates will effect the potential difference between the plate and the positive terminal in the wire? Thanks

You have already stated correctly that there is no potential difference between the plates and the battery terminals due to the (ideal) wire connections. Moving the plates doesn't change this observation. However, there are transient currents in the wires during the movement. E.g., when you move the plates further apart, the capacitance diminishes in time and thus the charge $Q$ on the plates is reduced as a function of distance. This means, that a reverse current has to flow into the battery. If your wire has a finite resistance, this causes a voltage drop between the plates and the terminals during the movement.


text:
Introduction to mechanics

Mechanics:-

So, what is mechanics? Mechanics we can say is an exact science. Again the question is what do I mean by an exact science. When we say that the physics or any branch of it is an exact science by this we mean that , its laws are expressed in the from of mathematical equations which describe and predict the results of precise quantitative measurements.

Mechanics is the study of the motions of material bodies. It may be further subdivided into three sub disciplines namely,

1. Kinematics :- Study and description of the possible motions of material bodies.
2. Dynamics :- It is the study of the laws which determine , among all possible motions, which motion will actually take place in in any given case.
3. Statics :- It is the study of forces and system of forces, with particular reference to system of forces which act on bodies at rest.

Every motion whether it is linear or rotational is governed by certain laws. Mechanics deals with these laws and formulates them in a scientific manner so that we can predict results. The concept of ‘force’ is fully explained by Newton through his laws of motion. The basic ideas of state of rest and uniform motion were studied by various philosophers. According to Aristotle (384 – 322 BC), a constant force has to be applied on a body so as to keep it in motion with constant velocity. Later on, Galileo (1564 – 1642 AD) stated that no force is required for a body to move with uniform velocity. Newton (1642 – 1727) was the first person who formulated the laws differentiating ‘state of rest’ and ‘state of uniform motion’.

Note:-  Symbols which appear in the equations that express the laws of science should represent quantities which can be expressed in numerical terms.

SOME IMPORTANT TERMS

To understand the motion of a body in different Frame of reference we came across few terms like

1. Particle:- It is just a quantity of matter,  having practically no linear dimensions but possesses only a position; the measure of this quantity of matter being the mass of the particle.
2.  Event:- An event stands for anything that occurs suddenly or instantaneously at a point in space. It, thus, involves both, a position and time of occurrence.
3. Observer:- A person or an equipment that can locate, record, measure and interpret an event is called an observer.

NEWTON’S NOTIONS OF SPACE

In Newton’s model both space and time are unaffected by the presence or absence of objects. That is space and time are absolute, an arena where the play of Nature unfolds. In Newton’s words,

Absolute space in its own nature, without relation to anything external, remains always similar and immovable.

1. Space is three dimensional :- The concept of space and time is fundamental to the study of mechanics. All objects occupy space and have length, breadth and height. Space is, therefore, three dimensional. This is why the position of a point can be specified completely by the three co-ordinates (x, y, z) or $(r, \theta, \phi)$.
2.  Space is flat :- i.e., it possesses Euclidean flatness. This means that the shortest distance between any two points in space is a straight line. If we take three points in space to form a triangle, the sum of angles is equal  to $\pi$. If it is a right angled triangle, then the three sides are related by Pythagoras Theorem i.e., Hypotenuse2 = Base
2 + Altitude2 However, according to latest theory, space is not exactly flat but somewhat curved. The departure from flatness is very small and can be ignored in the study of classical mechanics.
3. Space is homogeneous:- In other words, space is everywhere alike. Homogeneity of free space (a space in which fields and forces are absent) means transnational invariance of its properties i.e., the result of an experiment is not altered due to linear displacement of the co-ordinate systems.
4. Space is isotropic :- It means that if we consider a point O in space and we move from this point in any direction, the properties are the same i.e., there is nothing to distinguish one direction from the other. In other words, there is no preferred direction in space or one direction is as good as any other direction.


text:
# If the lines $2x+3y+1=0,\qquad 3x-y-4=0$ lie along diameter of a circle of circumference $10\pi$ then the equation of the circle is :

$\begin{array}{1 1}(A)\;x^2+y^2+2x-2y-23=0\\(B)\;x^2+y^2-2x-2y-23=0 \\(C)\;x^2+y^2+2x+2y-23=0 \\(D)\;x^2+y^2-2x+2y-23=0 \end{array}$

## 1 Answer

Two diameters are along
$2x+3y+1=0$
$3x-y-4=0$
on solving we get centre as $(1,-1)$
We know that circumference $=2 \pi r$
$2 \pi r=10 \pi$
$2r= 10$
$r=5$
Required circle is $(x-1)^2+(y+1)^2=5^2$
$x^2+y^2-2x+2y-23=0$
Hence D is the correct answer.
answered Apr 8, 2014 by

1 answer

1 answer

1 answer

1 answer

1 answer

1 answer

1 answer


text:
Algebra

# Absolute Value Inequalities: Level 3 Challenges

$\left | 1 - \frac{|x|}{1 + |x|} \right| \geq \frac{1}{2}$

The solution set to this inequality is $$a \le x \le b.$$ What is $$b-a?$$

How many integers $$x$$ satisfy the inequality $$|x-2000|+|x| \leq 9999$$?

How many ordered pairs of integers $$(x,y)$$ are there that satisfy $$|x| + |y| \leq 10$$?

Consider all monic polynomials $$f(x) = x^2 + bx + c$$, where $$b$$ and $$c$$ are real numbers. What is the minimum value of $$N$$, where

$N = \max_{x \in [-10,10]} \vert f(x) \vert?$

Details and assumptions

The last equation states: "The maximum value of the absolute value of $$f(x)$$ , as $$x$$ ranges from $$-10$$ to $$10$$ inclusive".

$\large 2=|x-2|+|x-4|$

Find the solution set of the above equation.

×