text:
# Important intergration substitution

1. Oct 16, 2007

### rs8910

int^{0}_{t}[cos(sqrt{x}]dx can any one tell me the solution to this question !!

2. Oct 16, 2007

### Gib Z

Welcome to PF rs8910. You should note that homework is to be threaded in the homework help section, and any homework must be accompanied by reasonable evidence that you have given the question a fair shot, which means including working and where you are stuck.

I can give you some limited help though. First let try a substitution that would get rid of that square root sign, and try some method of integrating products of 2 functions.

EDIT: I see you have given $$\LaTeX$$ a good shot, but you still need to learn how to use it properly. To see what something typed to form the TeX you see, just press on the image. It will also link you to a LaTeX guide.


text:
# Homotopic monoids and $A_\infty$ spaces

Informally, an $A_\infty$-space is a monoid whose laws are only satisfied up to homotopy.

Let’s define now what I will call a "homotopic monoid" to be a space $M$ together with a point $e\in{}M$ and a multiplication $m:M\times {}M\to{}M$ with the monoid laws satisfied "up to a path". More precisely, if $F$ is the fibration over $M^3$ such that the fiber over $(x,y,z)$ is the space of paths (in $M$) going from $m(m(x,y),z)$ to $m(x,m(y,z))$, then I want a section of this fibration (the section is part of the structure of homotopic monoid). And of course I want the same thing for the laws with $e$.
At least from the point of view of homotopy type theory, this is a very natural homotopy-theoretic generalization of the notion of monoid (we just replaced equality by existence of a path).

My questions are:

• Do those "homotopic monoids" have already been studied somewhere?
• What is the relationship between an $A_\infty$-space structure and a homotopic monoid structure? I think it is easy to prove that every $A_\infty$ space has a homotopic monoid structure, but I’m not sure of the converse.
-
For the relation between homotopy monoids and A∞-spaces one place to look at is also chapter 3 (in particular 3.4-3.5) of Tom Leinster's "Homotopy algebras for operads". In particular it is brought up that conceptually an A∞-space is a homotopy semigroup in Top∗ (spaces with basepoint) rather than a homotopy monoid in Top. –  Gjergji Zaimi Aug 17 '11 at 16:33

Ignoring the unit conditions for a moment, what you are defining is called an $A_3$-structure on the space $M$. It is the third stage of a whole iteratively defined chain of structures on a space (the $n$-th being called an $A_n$-structure). These were studied by Stasheff in the 1960s.

An equivalent way to write your condition is to specify a homotopy $I \times M^3 \to M$ from $(({-},{-}),{-})$ to $({-},({-},{-}))$ (here I am using $({-},{-})$ to designate your multiplication $m$).

In this context, the unit interval functions as the second space in the Stasheff associahedron.

Regarding units, Stasheff did not deal with unit conditions up to homotopy, since, under mild hypotheses, one can assume the basepoint is a strict unit for the multiplication. The full unit conditions appear later in the book by Boardman and Vogt.

-

It seems to me that rewriting this in terms of ordinary homotopies, you get something very like what is described in Segal's old paper (with categories and cohomology theories in the title I think). It occurs also in work by Vogt about 1973 and would then seem to be a truncated version of a homotopy coherent associativity law. My one doubt is that the existence of the path should not be enough to get a good analogue of a monoid as how would you get the quadruple associativity law... or would you not have one (you would not in general get one path but two ... hence you need to have a homotopy between them and so on.) This may not answer your question but I suggest looking at the work on homotopy coherence (e.g. [[homotopy coherent diagram]] as the combinatorial considerations in that area would seem relevant to your query.)

-

format: plain


text:
RUS  ENG JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB
 General information Latest issue Archive Impact factor Search papers Search references RSS Latest issue Current issues Archive issues What is RSS

 Nelin. Dinam.: Year: Volume: Issue: Page: Find

 Nelin. Dinam., 2016, Volume 12, Number 1, Pages 75–90 (Mi nd513)

Original papers

On the stability of the two-link trajectory of the parabolic Birkhoff billiards

A. P. Markeev

A.Ishlinsky Institite for Problems in Mechanics, Russian Academy of Sciences, pr. Vernadskogo 101-1, Moscow, 119526, Russia

Abstract: We study the inertial motion of a material point in a planar domain bounded by two coaxial parabolas. Inside the domain the point moves along a straight line, the collisions with the boundary curves are assumed to be perfectly elastic. There is a two-link periodic trajectory, for which the point alternately collides with the boundary parabolas at their vertices, and in the intervals between collisions it moves along the common axis of the parabolas. We study the nonlinear problem of stability of the two-link trajectory of the point.

Keywords: map, canonical transformations, Hamilton system, stability

 Funding Agency Grant Number Russian Foundation for Basic Research 14-01-00380_à

Full text: PDF file (371 kB)
References: PDF file   HTML file
UDC: 531.01, 531.36
MSC: 70H05, 70H15, 70E50
Revised: 22.02.2016

Citation: A. P. Markeev, “On the stability of the two-link trajectory of the parabolic Birkhoff billiards”, Nelin. Dinam., 12:1 (2016), 75–90

Citation in format AMSBIB
\Bibitem{Mar16} \by A.~P.~Markeev \paper On the stability of the two-link trajectory of the parabolic Birkhoff billiards \jour Nelin. Dinam. \yr 2016 \vol 12 \issue 1 \pages 75--90 \mathnet{http://mi.mathnet.ru/nd513}

• http://mi.mathnet.ru/eng/nd513
• http://mi.mathnet.ru/eng/nd/v12/i1/p75

 SHARE:

Citing articles on Google Scholar: Russian citations, English citations
Related articles on Google Scholar: Russian articles, English articles

This publication is cited in the following articles:
1. A. P. Markeev, “On the stability of periodic trajectories of a planar Birkhoff billiard”, Proc. Steklov Inst. Math., 295 (2016), 190–201
2. Anatoly P. Markeev, “On the Stability of Periodic Motions of an Autonomous Hamiltonian System in a Critical Case of the Fourth-order Resonance”, Regul. Chaotic Dyn., 22:7 (2017), 773–781
3. A. N. Kirillov, R. V. Alkin, “Ustoichivost periodicheskikh bilyardnykh traektorii v treugolnike”, Izv. Sarat. un-ta. Nov. ser. Ser. Matematika. Mekhanika. Informatika, 18:1 (2018), 25–39
•  Number of views: This page: 150 Full text: 50 References: 26


text:
2013
12-26

# ICPC Scoreboard

Charles is the contest director for the ICPC Tumbolian regional contest. His responsibility is ensuring the contest flows smoothly, that the contest rules are applied fairly, and, of course, announcing the final contest ranking.

According to ICPC rules, a team with more solved problems ranks above a team with less solved problems. If two teams have the same number of solved problems, the team with the smaller total penalty ranks above the team with the larger total penalty (in case both teams have the same number of solved problems and the same penalty, Charles considers them as tied).

The total penalty for a team is the sum of all the problem penalties of the problems that team has solved. The problem penalty for a problem is TP +EP ×FA, where TP is the time penalty for that problem, EP is the contest’s error penalty and FA is the number of failed attempts at solving the problem before submitting a correct solution.

The time penalty for a problem is the time since the start of the contest, in minutes, that the team needed to solve the problem. The error penalty is a positive integer chosen by the contest director, designed to reward teams that submit correct solutions on the first attempt.

Charles wants to change the error penalty from the “standard” value of 20 minutes to stir things up. To study the effects of that change on the final rankings, he wants to know the range of error penalties that don’t change the final standings.

In other words, if team A is ahead of team B in the original standings, then A should be ahead of B in the modified standings; if A and B are tied in the original standings, they should also be tied in the modified standings (the original standings are the ones obtained with an error penalty of 20 minutes).

Charles has been very busy organizing the Tumbolian regional, so he asked you to make a program that will compute the range for him.

The input contains several test cases. The first line of each test case contains two integers T and P separated by a single space, indicating the number of teams and the number of problems, respectively (2 <= T <= 100, 1 <= P <= 10). Each one of the next T lines describes the performance of a team. A team’s performance description is a line containing P problem descriptions separated by single spaces. Teams are not necessarily given in order of their final standings.

Each problem description is a string “A/S”, where A is an integer representing the number of attempts that the corresponding team made at solving that problem (0 <= A <= 100), and S is either “-”, if the team did not solve that problem, or an integer indicating the number of minutes it took for the team to submit a correct solution (1 <= S <= 300). Attempts made after the first correct submission are not counted.
The end of input is indicated by T = P = 0.

The input contains several test cases. The first line of each test case contains two integers T and P separated by a single space, indicating the number of teams and the number of problems, respectively (2 <= T <= 100, 1 <= P <= 10). Each one of the next T lines describes the performance of a team. A team’s performance description is a line containing P problem descriptions separated by single spaces. Teams are not necessarily given in order of their final standings.

Each problem description is a string “A/S”, where A is an integer representing the number of attempts that the corresponding team made at solving that problem (0 <= A <= 100), and S is either “-”, if the team did not solve that problem, or an integer indicating the number of minutes it took for the team to submit a correct solution (1 <= S <= 300). Attempts made after the first correct submission are not counted.
The end of input is indicated by T = P = 0.

5 3
0/- 0/- 0/-
2/- 2/- 1/-
1/60 1/165 1/-
1/80 0/- 2/120
0/- 1/17 0/-
4 2
17/- 5/-
2/7 3/-
3/- 2/-
1/15 0/-
3 2
1/- 2/15
2/53 1/17
1/70 1/20
0 0

1 24
9 *
20 20


text:
## Selina Concise Mathematics Class 10 ICSE Solutions Linear Inequations (in one variable)

Selina Publishers Concise Mathematics Class 10 ICSE Solutions Chapter 4 Linear Inequations (in one variable)

### Question 1.Solution:

Question 2.
State, whether the following statements are true or false:
(i) a < b, then a – c < b – c (ii) If a > b, then a + c > b + c
(iii) If a < b, then ac > bc
(iv) If a > b, then $$\frac { a }{ c } <\frac { b }{ c }$$
(v) If a – c > b – d, then a + d > b + c
(vi) If a < b, and c > 0, then a – c > b – c
Where a, b, c and d are real numbers and c ≠ 0.
Solution:
(i) a < b ⇒ a – c < b – c The given statement is true.
(ii) If a > b ⇒ a + c > b + c
The given statement is true.
(iii) If a < b ⇒ ac < bc The given statement is false.
(iv) If a > b ⇒ $$\frac { a }{ c } >\frac { b }{ c }$$
The given statement is false.
(v) If a – c > b – d ⇒ a + d > b + c
The given statement is true.
(vi) If a < b ⇒ a – c < b – c (Since, c > 0)
The given statement is false.

Question 3.
If x ∈ N, find the solution set of inequations.
(i) 5x + 3 ≤ 2x + 18
(ii) 3x – 2 < 19 – 4x
Solution:
(i) 5x + 3 ≤ 2x + 18
5x – 2x ≤ 18 – 3
3x ≤ 15
x ≤ 5
Since, x ∈ N, therefore solution set is {1, 2, 3, 4, 5}.
(ii) 3x – 2 < 19 – 4x
3x + 4x < 19 + 2
7x < 21
x < 3
Since, x ∈ N, therefore solution set is {1, 2}.

Question 4.

Solution:
(i) x + 7 ≤ 11
x ≤ 11 – 7
x ≤ 4
Since, the replacement set = W (set of whole numbers)
⇒ Solution set = {0, 1, 2, 3, 4}
(ii) 3x – 1 > 8
3x > 8 + 1
x > 3
Since, the replacement set = W (set of whole numbers)
⇒ Solution set = {4, 5, 6, …}
(iii) 8 – x > 5
– x > 5 – 8
– x > -3
x < 3
Since, the replacement set = W (set of whole numbers)
⇒ Solution set = {0, 1, 2}

Since, the replacement set = W (set of whole numbers)
∴ Solution set = {0, 1, 2}

Since, the replacement set = W (set of whole numbers)
∴ Solution set = {0, 1}
(vi) 18 ≤ 3x – 2
18 + 2 ≤ 3x
20 ≤ 3x
x ≥ $$\frac { 20 }{ 3 }$$
Since, the replacement set = W (set of whole numbers)
∴ Solution set = {7, 8, 9, …}

Question 5.
Solve the inequation:
3 – 2x ≥ x – 12 given that x ∈ N.
Solution:
3 – 2x ≥ x – 12
-2x – x ≥ -12 – 3
-3x ≥ -15
x ≤ 5
Since, x ∈ N, therefore,
Solution set = {1, 2, 3, 4, 5}

Question 6.
If 25 – 4x ≤ 16, find:
(i) the smallest value of x, when x is a real number,
(ii) the smallest value of x, when x is an integer.
Solution:
25 – 4x ≤ 16
-4x ≤ 16 – 25
-4x ≤ -9
x ≥ $$\frac { 9 }{ 4 }$$
x ≥ 2.25
(i) The smallest value of x, when x is a real number, is 2.25.
(ii) The smallest value of x, when x is an integer, is 3.

Question 7.

Solution:

Question 8.

Solution:

Thus, the required smallest value of x is -1.

Question 9.
Find the largest value of x for which
2(x – 1) ≤ 9 – x and x ∈ W.
Solution:
2(x – 1) ≤ 9 – x
2x – 2 ≤ 9 – x
2x + x ≤ 9 + 2
3x ≤ 11
x ≤ $$\frac { 11 }{ 3 }$$
x ≤ 3.67
Since, x ∈ W, thus the required largest value of x is 3.

Question 10.

Solution:

Question 11.
Given x ∈ {integers}, find the solution set of:
-5 ≤ 2x – 3 < x + 2
Solution:

Question 12.
Given x ∈ {whole numbers}, find the solution set of:
-1 ≤ 3 + 4x < 23

Solution:

### Linear Inequations in One Variable Exercise 4B – Selina Concise Mathematics Class 10 ICSE Solutions

Question 1.

Solution:

Question 2.

Solution:

Question 3.

Solution:

Question 4.

Solution:

Question 5.
x ∈ {real numbers} and -1 < 3 – 2x ≤ 7, evaluate x and represent it on a number line.
Solution:
-1 < 3 – 2x ≤ 7
-1 < 3 – 2x and 3 – 2x ≤ 7
2x < 4 and -2x ≤ 4
x < 2 and x ≥ -2
Solution set = {-2 ≤ x < 2, x ∈ R}
Thus, the solution can be represented on a number line as:

Question 6.
List the elements of the solution set of the inequation
-3 < x – 2 ≤ 9 – 2x; x ∈ N.
Solution:
-3 < x – 2 ≤ 9 – 2x
-3 < x – 2 and x – 2 ≤ 9 – 2x
-1 < x and 3x ≤ 11
-1 < x ≤ $$\frac { 11 }{ 3 }$$
Since, x ∈ N
∴ Solution set = {1, 2, 3}

Question 7.

Solution:

Question 8.

Solution:

Question 9.
Given x ∈ {real numbers}, find the range of values of x for which -5 ≤ 2x – 3 < x + 2 and represent it on a number line.
Solution:
-5 ≤ 2x – 3 < x + 2
-5 ≤ 2x – 3 and 2x – 3 < x + 2
-2 ≤ 2x and x < 5
-1 ≤ x and x < 5
Required range is -1 ≤ x < 5.
The required graph is:

Question 10.
If 5x – 3 ≤ 5 + 3x ≤ 4x + 2, express it as a ≤ x ≤ b and then state the values of a and b.
Solution:
5x – 3 ≤ 5 + 3x ≤ 4x + 2
5x – 3 ≤ 5 + 3x and 5 + 3x ≤ 4x + 2
2x ≤ 8 and -x ≤ -3
x ≤ 4 and x ≥ 3
Thus, 3 ≤  x ≤ 4.
Hence, a = 3 and b = 4.

Question 11.
Solve the following inequation and graph the solution set on the number line:
2x – 3 < x + 2 ≤ 3x + 5, x ∈ R.
Solution:
2x – 3 < x + 2 ≤ 3x + 5
2x – 3 < x + 2 and x + 2 ≤ 3x + 5
x < 5 and -3 ≤ 2x
x < 5 and -1.5 ≤ x
Solution set = {-1.5 ≤ x < 5}
The solution set can be graphed on the number line as:

Question 12.
Solve and graph the solution set of:
(i) 2x – 9 < 7 and 3x + 9 ≤ 25, x ∈ R (ii) 2x – 9 ≤ 7 and 3x + 9 > 25, x ∈ I
(iii) x + 5 ≥ 4(x – 1) and 3 – 2x < -7, x ∈ R
Solution:

Question 13.
Solve and graph the solution set of:
(i) 3x – 2 > 19 or 3 – 2x ≥ -7, x ∈ R
(ii) 5 > p – 1 > 2 or 7 ≤ 2p – 1 ≤ 17, p ∈ R
Solution:
(i) 3x – 2 > 19 or 3 – 2x ≥ -7
3x > 21 or -2x ≥ -10
x > 7 or x ≤ 5
Graph of solution set of x > 7 or x ≤ 5 = Graph of points which belong to x > 7 or x ≤ 5 or both.
Thus, the graph of the solution set is:

(ii) 5 > p – 1 > 2 or 7 ≤ 2p – 1 ≤ 17
6 > p > 3 or 8 ≤ 2p ≤ 18
6 > p > 3 or 4 ≤ p ≤ 9
Graph of solution set of 6 > p > 3 or 4 ≤ p ≤ 9
= Graph of points which belong to 6 > p > 3 or 4 ≤ p ≤ 9 or both
= Graph of points which belong to 3 < p ≤ 9
Thus, the graph of the solution set is:

Question 14.

Solution:
(i) A = {x ∈ R: -2 ≤ x < 5}
B = {x ∈ R: -4 ≤ x < 3}
(ii) A ∩ B = {x ∈ R: -2 ≤ x < 5}
It can be represented on number line as:

B’ = {x ∈ R: 3 < x ≤ -4}
A ∩ B’ = {x ∈ R: 3 ≤ x < 5}
It can be represented on number line as:

Question 15.
Use real number line to find the range of values of x for which:
(i) x > 3 and 0 < x < 6
(ii) x < 0 and -3 ≤ x < 1
(iii) -1 < x ≤ 6 and -2 ≤ x ≤ 3
Solution:
(i) x > 3 and 0 < x < 6
Both the given inequations are true in the range where their graphs on the real number lines overlap.
The graphs of the given inequations can be drawn as:

From both graphs, it is clear that their common range is
3 < x < 6
(ii) x < 0 and -3 ≤ x < 1
Both the given inequations are true in the range where their graphs on the real number lines overlap.
The graphs of the given inequations can be drawn as:

From both graphs, it is clear that their common range is
-3 ≤ x < 0
(iii) -1 < x ≤ 6 and -2 ≤ x ≤ 3
Both the given inequations are true in the range where their graphs on the real number lines overlap.
The graphs of the given inequations can be drawn as:

From both graphs, it is clear that their common range is
-1 < x ≤ 3

Question 16.
Illustrate the set {x: -3 ≤ x < 0 or x > 2, x ∈ R} on the real number line.
Solution:
Graph of solution set of -3 ≤ x < 0 or x > 2
= Graph of points which belong to -3 ≤ x < 0 or x > 2 or both
Thus, the required graph is:

Question 17.
Given A = {x: -1 < x ≤ 5, x ∈ R} and B = {x: -4 ≤ x < 3, x ∈ R}
Represent on different number lines:
(i) A ∩ B
(ii) A’ ∩ B
(iii) A – B
Solution:

Question 18.
P is the solution set of 7x – 2 > 4x + 1 and Q is the solution set of 9x – 45 ≥ 5(x – 5); where x ∈ R. Represent:
(i) P ∩ Q
(ii) P – Q
(iii) P ∩ Q’
on different number lines.
Solution:

Question 19.

Solution:

Question 20.
Given: A = {x: -8 < 5x + 2 ≤ 17, x ∈ I}, B = {x: -2 ≤ 7 + 3x < 17, x ∈ R}
Where R = {real numbers} and I = {integers}. Represent A and B on two different number lines. Write down the elements of A ∩ B.
Solution:

Question 21.
Solve the following inequation and represent the solution set on the number line 2x – 5 ≤ 5x +4 < 11, where x ∈ I
Solution:

Question 22.

Solution:

Question 23.
Given:
A = {x: 11x – 5 > 7x + 3, x ∈ R} and
B = {x: 18x – 9 ≥ 15 + 12x, x ∈ R}.
Find the range of set A ∩ B and represent it on number line.
Solution:
A = {x: 11x – 5 > 7x + 3, x ∈ R}
= {x: 4x > 8, x ∈ R}
= {x: x > 2, x ∈ R}
B = {x: 18x – 9 ≥ 15 + 12x, x ∈ R}
= {x: 6x ≥ 24, x ∈ R}
= {x: x ≥ 4, x ∈ R}
A ∩ B = {x: x ≥ 4, x ∈ R}
It can be represented on number line as:

Question 24.

Solution:

Question 25.

Solution:

Question 26.

Solution:

Question 27.
Find three consecutive largest positive integers such that the sum of one-third of first, one-fourth of second and one-fifth of third is atmost 20.
Solution:
Let the required integers be x, x + 1 and x + 2.
According to the given statement,

Thus, the largest value of the positive integer x is 24.
Hence, the required integers are 24, 25 and 26.

Question 28.
Solve the given inequation and graph the solution on the number line.
2y – 3 < y + 1 ≤ 4y + 7, y ∈ R
Solution:
2y – 3 < y + 1 ≤ 4y + 7, y ∈ R
⇒ 2y – 3 – y < y + 1 – y ≤ 4y + 7 – y
⇒ y – 3 < 1 ≤ 3y + 7
⇒ y – 3 < 1 and 1 ≤ 3y + 7
⇒ y < 4 and 3y ≥ 6 ⇒ y ≥ – 2
⇒ – 2 ≤ y < 4
The graph of the given equation can be represented on a number line as:

Question 29.
Solve the inequation:
3z – 5 ≤ z + 3 < 5z – 9, z ∈ R.
Graph the solution set on the number line.
Solution:
3z – 5 ≤ z + 3 < 5z – 9
3z – 5 ≤ z + 3 and z + 3 < 5z – 9
2z ≤ 8 and 12 < 4z
z ≤ 4 and 3 < z
Since, z R
∴ Solution set = {3 < z ≤ 4, x ∈ R }
It can be represented on a number line as:

Question 30.

Solution:

Question 31.

Solution:

Question 32.

Solution:

Question 33.

Solution:

Question 34.
Solve the following in equation and write the solution set:
13x – 5 < 15x + 4 < 7x + 12, x ∈ R
Solution:

Question 35.
Solve the following inequation, write the solution set and represent it on the number line.
-3(x – 7) ≥ 15 – 7x > x+1/3, x R.
Solution:

Question 36.
Solve the following inequation and represent the solution set on a number line.

Solution:

More Resources for Selina Concise Class 10 ICSE Solutions


text:
# The Eulerian stretch of a digraph and the ending guarantee of a convergence routing

1 OPALE - Optimization and control, numerical algorithms and integration of complex multidiscipline systems governed by PDE
CRISAM - Inria Sophia Antipolis - Méditerranée , JAD - Laboratoire Jean Alexandre Dieudonné : UMR6621
3 RESEDAS - Software Tools for Telecommunications and Distributed Systems
INRIA Lorraine, LORIA - Laboratoire Lorrain de Recherche en Informatique et ses Applications
Abstract : In this paper, we focus on convergence packet routing techniques in a network, obtained from an Eulerian routing in the digraph modeling the target network. Given an Eulerian circuit $\cal C$ in a digraph $G$, we consider the maximal number $diamW_{\cal C}$ of arcs that a packet has to follow on $\cal C$ from its origin to its destination (we talk about the {\em ending guarantee} of the routing). We consider the {\em Eulerian diameter of $G$} as defined by ${\cal E}(G)=\min\limits_{{\cal C}? Eul(G)} diamW_{\cal C}$, where $Eul(G)$ is the set of all the Eulerian circuits in $G$. After giving a preliminary result about the complexity of finding ${\cal E}(G)$ for any digraph $G$, we give some lower and upper bounds of this parameter. We conclude by giving some families of digraphs having good Eulerian diameter.
Mots-clés :
Document type :
Reports
Domain :

https://hal.inria.fr/inria-00099331
Contributor : Publications Loria <>
Submitted on : Tuesday, September 26, 2006 - 8:52:59 AM
Last modification on : Friday, February 26, 2021 - 3:28:07 PM

### Identifiers

• HAL Id : inria-00099331, version 1

### Citation

Dominique Barth, Pascal Berthomé, Johanne Cohen. The Eulerian stretch of a digraph and the ending guarantee of a convergence routing. [Intern report] A00-R-400 || barth00a, 2000, 22 p. ⟨inria-00099331⟩

Record views


text:
Robust Control of IPMSM Using T-S Fuzzy Disturbance Observer

Title & Authors
Robust Control of IPMSM Using T-S Fuzzy Disturbance Observer
Kim, Min-Chan; Li, Xiu-Kun; Park, Seung-Kyu; Kwak, Gun-Pyong; Ahn, Ho-Kyun; Yoon, Tae-Sung;

Abstract
To improve the control performance of the IPMSM, a novel nonlinear disturbance observer is proposed by using the T-S fuzzy model. A T-S fuzzy model is the combination of local linear models considered at each operating point. Usually the inverse model is easy to obtain in linear systems but not in nonlinear systems. To design a nonlinear disturbance observer, a nonlinear inverse model is obtained based on nonlinear inverse model which is the fuzzy combination of the local linear inverse models. The proposed DOB is used with a PDC controller which is one of the T-S fuzzy controller, and its performance improvement is shown from the simulation results.
Keywords
Nonlinear Disturbance Observer;Interior Permanent Magnet Synchronous Motors;T-S Fuzzy Model;PDC Controller;
Language
English
Cited by
References
1.
THOMAS M. JAHNS, GERALD B. KLIMAN, and THOMAS W. NEUMANN, "Interior Permanent-Magnet Synchronous Motors for Adjustable-Speed Drives,". IEEE Transactions on industry application, vol. IA-22, no. 4, pp. 738-747, Jul./Aug. 1986.

2.
Casey B. Butt and M. Azizur Rahman, " Intelligent Speed Control of Interior Permanent Magnet Motor Drives Using a Single Untrained Artificial Neuron,". IEEE Transactions on industry application, vol 49, no. 4, pp. 1836-1843, Jul./ Aug. 2013.

3.
A.G. Aissaoui, M. Abid, A. Tahour and A. C. Megherbi, "A Fuzzy Logic and Variable Structure Control for Permanent Magnet Synchronous Motors," International Journal of Systems Control, vol. 1, Iss. 1, pp. 13-21, 2010.

4.
M. Nasir Uddin and M. Azizur Rahma, "High-Speed Control of IPMSM Drives Using Improved Fuzzy Logic Algorithms," IEEE Transactions on industrial electronics, vol. 54, no. 1, Feb. 2007.

5.
Boldea, I., Paicu, M.C., Andreescu, G.D. and Blaabjerg, F., "Active flux orientation vector sensorless control of IPMSM," Proc. Of IEEE Optimization of Electrical and Electronic Equipment 2008, pp. 161-168, May 2008.

6.
Chy. Md. M.I. and Uddin. M.N., "Nonlinear Control of Interior Permanent Magnet Synchronous Motor Incorporating Flux Control," Proc. Of IEEE Electrical and Computer Engineering 2006, pp. 815-818, Canadian, May 2006.

7.
Tomohiro Takagi, Michio Sugeno, "Fuzzy Identification of Systems and Its Applications to Modeling and Control," IEEE Transactions on SMC, vol. 15, pp.116-132, 1985.

8.
Chung-Hsun Sun, Yin-Tien Wang, and Cheng-Chung Chang, "Design of T-S Fuzzy Controller for Two-wheeled Mobile Robot," Proceedings of 2011 International Conference on System Science and Engineering, Macau, China, Jun. 2011.

9.
Gwo-Ruey Yu, Heng-Ta Hsieh, " Robust Control of an Underactuated Robot via T-S Fuzzy Region Model," Proceedings of the 8th World Congress on Intelligent Control and Automation, Taipei, Taiwan, Jun. 21-25 2011.

10.
Chaoquan Li, Xueshan Gao, Qiang Huang, Fuquan Dai, Jie Shao, Yang Bai, Kejie Li, "A coaxial couplewheeled robot with T-S fuzzy equilibrium control," Industrial robot : An International Journal, vol:38, iss:3 pp. 292 -300, 2011.

11.
Yew-Wen Liang, Sheng-Dong Xu,Der-Cherng Liaw and Cheng-Chang Chen," A Study of T-S Model-Based SMC Scheme With Application to Robot Control," IEEE Transactions on Industrial Electronics, vol. 55, no. 11, pp. 3964-3971, 2008.

12.
Y.X. Su, C.H. Zheng, and B.Y. Duan, "Automatic disturbances rejection controller for precise motion control of permanent-magnet synchronous motors," IEEE Transactions, Industrial Electronics, vol. 52, no. 3, pp. 814-823, Jun. 2005.

13.
E. Schrijver and J. van Dijk, "Disturbance observers for rigid mechanical systems: Equivalence, stability, and design," Journal of Dynamic Systems, Measurement, and Control, vol. 124, no. 4, pp. 539-548, 2002.

14.
W.-H. Chen and L. Guo, "Analysis of disturbance observer based control for nonlinear systems under disturbances with bounded variation," in Proceedings of Control 2004, UK, Sep. 2004.

15.
G. H. Hostetter and J. Meditch, "On the generalization of observers to systems with unmeasurable, unknown inputs," Automatica, vol. 9, pp. 721-724, 1973.

16.
Nam Hoon Jo, Hyungbo Shim, and Young Ik Son," Disturbance Observer for Non-minimum Phase Linear Systems," International Journal of Control, Automation, and Systems (2010), vol. 8, no. 5, pp. 994-1002, 2010.

17.
T. Mita, M. Hirata, K. Murata and H. Zhang, "$H_{\infty}$ control versus disturbance-observer-based control," IEEE Transactions on Industrial Electronics, vol. 45, no. 3, pp. 488-495, 1998.

18.
H. Kobayashi, S. Katsura and K. Ohnishi, "An analysis of parameter variations of disturbance observer for motion control," IEEE Transactions on Industrial Electronics, vol.54, no.6, 2007.

19.
Patrick Gerland, Dominic Gross, Horst Schulte, and Andreas Kroll, "Design of Sliding Mode Observers for TS Fuzzy Systems with Application to Disturbance and Actuator Fault Estimation," 49th IEEE Conference on Decision and Control Dec. 15-17, 2010.

20.
DEZHI XU, B IN JIANG, Peng Shi, "NONLINEAR ACTUATOR FAULT ESTIMATION OBSERVER: AN INVERSE SYSTEM APPROACH VIA A T-S FUZZY MODEL," Int. J. Appl. Math. Comput. Sci., vol. 22, no. 1, pp. 183-196, 2012.


text:
# Case Sensitive Strings

Since this isn't explicitly codified anywhere, and was sparked by discussion surrounding my recent challenge, I figured I'd bring it up here for consensus before modifying the tag.

Related:

## The Question

When a challenge asks for a string, what should the default case-sensitivity be?

## 1 Answer

Unless specified otherwise, strings are case-sensitive. More generally, unless specified otherwise, strings are just sequences of characters with no semantics attached to any specific characters.

This should also be the least surprising default for users who are not aware of this post.

I'd also urge challenge authors to think twice before making a challenge case-insensitive. We've done case insensitivity more than often enough, and most of the time it's a concern that's completely orthogonal to the actual task of the challenge, and it just adds extra code for handling the case-insensitivity which adds nothing at all to the answers. Related reading.

• This answer hits the nail on the head. If you think about strings as sequence of bytes in a particular encoding, case-insensitivity makes no sense. While whether or not "A" == "a" could be questioned, no reasonable person would think 0x41 == 0x61. – user45941 Jul 2 '16 at 0:01
• May you bold the "it just adds extra code" so at a glance it's clear what your stance is on this? – Downgoat Jul 8 '16 at 3:33


text:
# Abstract

Two of the most important outcomes of The Contradictory Christ include: (i) identifying Christ as an unproblematically contradictory being as well as (ii) laying the foundations of an investigation of the logical consequences of the existence of Christ, qua contradictory, within a particular 'theory'.

In light of the enormous relevance of Beall’s The contradictory Christ for the study of inconsistency, my main concern here is to explore the effect of some methodological choices behind Beall’s proposal -this in order to recognize in more detail the scope of Beall’s contribution. To do so, I will focus on three main questions: 1. What is required for the identification of a contradiction? 2. How can we recognize a true contradiction from either an apparent or a temporal contradiction? 3. If we identify a true contradiction within a theory, where can we actually go from there?

Keywords:
Christ; Contradictory; Inconsistency Toleration; Scientific Theory

# 1. Introduction

A central thesis of The contradictory Christ (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.) is that Christ is an unproblematically contradictory being. The main reasoning behind this thesis goes as follows.

• First, Christ is contradictory because he has all of the limitlessness of God, and all of the limits of humans, he is also passible and impassible as well as capable of suffering and incapable of suffering, among others.

• Second, pace classical views on logic, the contradictory character of Christ is non-problematic as it doesn't seem to threaten sensible reasoning in any significant way. On the one hand, humans can keep reasoning sensibly from the inconsistent information that they have about Christ; on the other hand, and regardless of human cognitive achievements, the theories in which Christ is a contradictory entity, are unequivocally non-trivial.

• Third, Christ seems to be an essentially contradictory entity due to actually possessing two contrary natures, the one divine and the other human. Meaning that the contradictions that we associate to Christ correspond to some of his most fundamental features and that any correct understanding of Christ must include his contradictory character.

Given the above, Christ is not only an entity that can be described in an inconsistent manner, but is an entity that demands to be understood qua contradictory. In this sense, in any theory in which Christ exists and is contradictory, there would be some contradictions about him that are necessarily true.

Two of the most important outcomes of The Contradictory Christ include: (i) identifying Christ as an unproblematically contradictory being as well as (ii) laying the foundations of an investigation of the logical consequences of the existence of Christ, qua contradictory, within a particular 'theory'.

The richness of the book lies, at least partially, in providing an exemplar of a theory that contains a legitimate contradictory entity at its very core, and that, despite of being grounded in a contradiction, has remained explanatory successful -and has shaped the majority of dominant worldviews during the last two thousand years. In this regard, the novelty of Beall's proposal is that, even if there have been early attempts to identify a (non-formal) domain that legitimately demands to be described and explained through true contradictions, these attempts have systematically failed. If Beall's reconstruction of the contradictory Christ is correct, he might have identified such a domain.

In light of the enormous relevance of Beall's work for the study of inconsistency, my main concern here is to explore the effect of some methodological choices behind Beall's proposal -this in order to recognize, in more detail, the actual scope of his contribution.

# 2. The methodological roots

There are fundamentally two ways of thinking about Christ, exemplified respectively by religious practice and ritual on the one hand and philosophical and scientific inquiry on the other, with some thinkers like Kierkegaard and Wittgenstein aiming to bridge those approaches. They exemplify two different approaches to religious concepts and ideas:

• An approach based on faith plus community, where those brought together by that faith commit themselves to observe certain practices and rituals.

• An approach aimed at the rational investigation of the claims made in religious texts and practices, aimed at investigating and clarifying the nature of the objects and narratives of religious worship.2 2 I am fully aware of the fact that there is an ongoing philosophical debate about the methodology for determining the meaning of religious language, however, as Beall does not focus on such debate, I believe this will suffice for the purposes of the paper.

Beall’s work is more in line with the second sort of approach. His main contribution is the application of techniques and ideas from the philosophy of logic to religious questions and puzzles. But these puzzles emerge from this treatment of religion as a domain of inquiry susceptible to rational investigation, just the sort of approach ejected by thinkers like Kierkegaard and Wittgenstein.

Since these types of approaches are committed to taking the religious domain as susceptible of rational investigation they are themselves open to methodological critique, unlike religious rituals and practices which while open to ethical criticism (in some instances) cannot he said to be “truth-apt” unlike the claims of deistic thinkers that are in the business of interpreting religion as about the world3 3 Thanks to Moisés Macías-Bustos, who helped me to give a better phrasing of my ideas on this point. .

When religious claims are interpreted in the above manner they are theoretical claims: claims about what sorts of objects there are and what are their properties and relations, where Christ is treated as a theoretical entity which lives in a very specifically constrained world, and such a world can be explored through the analysis of the relations that allow for correct descriptions, explanations and predictions of what occurs in that world. In this sense, Beall’s approach to Christ takes Christ to be a theoretical entity that is either postulated, described or explained by the theory of Christology. In addition, Christology is seen as a theory that provides us with the general picture of the world in which Christ exists, regardless of whether this picture coincides with our actual world.

For these reasons, according to Beall’s approach, Christology works as a kind of scientific theory and Christ is seen as a fundamental entity of the ontology that the theory postulates. As a matter of fact, Bell makes this connection explicit when saying that,

Christian theology is a theory of God, just as macro physics is a theory of the macro-physical world and just as mathematical theories are theories of their respective mathematical phenomena (numbers, categories, sets, whathaveyou. (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.:23)

In this sense, Beall’s project is in good company. During the last decades, much attention has been paid to the role and authenticity of inconsistency in science. It has been claimed that, in scientific contexts, contradictions are not as dangerous as once feared they were, and even that they are quite common in scientific activity. This perspective has been enriched by the study of paraconsistent logics and the emergence of case studies from the history of science that seem to illustrate how the presence of some contradictions do not necessarily mean the logical explosion of the theory in question.4 4 Principle of Explosion (PE) is one of the most characteristic principles of classical logic (and of any other explosive logic), it says that any (explosive) theory will trivialize if it contains at least one contradiction. A contradiction is a pair of propositions, where one is the negation of the other. A theory is trivial if it is possible to derive any proposition from it. Therefore, any inconsistent (explosive) theory will be trivial. A logical consequence relation is paraconsistent if it is non-explosive, this is, if it does not validate PE; and a formal theory is paraconsistent if, despite containing a contradiction, it is not trivial.

A according to many paraconsistent logicians, scientific theories can be, and have been, inconsistent without thereby endangering the rationality of those who use them. The history of science contains sufficient evidence that proves that contradictions have been tolerated for long periods, and that during these periods, scientists have used efficiently their their inconsistent theories to describe, predict and even explain phenomena (cf. Smith 198828. Smith, J. (1988): “Inconsistency and scientific reasoning”, Studies in History and Philosophy of Science Part A 19 (4):429-445., Brown, 19907. Brown, B. (1990): “How to be realistic about inconsistency in science”, Studies in History and Philosophy of Science 21 (2): 281--294.; Bueno 199710. Bueno, O. (1997): “Empirical Adequacy: A Partial Structures Approach”, Studies in History and Philosophy of Science 28:585--610, 2006; Batens 19981. Batens, D. (1998): “Paraconsistency and its relation to worldviews”, Foundations of Science, Volume 3, Issue 2: 259--283., 20022. Batens, D. (2002): “In Defence of a Programme for Handling Inconistency”, in Inconsistency in Science , Kluwer Academic Publishers, Netherlands: 129--150.; Meheus 200221. Meheus, J. (2002): “How to reason sensibly yet naturally from inconsistencies”, in Inconsistency in Science , Kluwer Academic Publishers, Netherlands: 151--164.; Priest 2002; Martínez-Ordaz 2017, 202020. Martínez-Ordaz, M. del R. (2020): “The ignorance behind inconsistency toleration”, S.I. Knowing the unknown, Synthese .).

The work done in the philosophy of science has shed important light on the phenomenon of working with inconsistent information while avoiding logical triviality at the same time. This phenomenon has been called inconsistency toleration. In the case of human reasoning, this phenomenon consists of identifying a contradiction in a piece of reasoning and still being able to reason sensibly with the inconsistent information, this is, remaining able to distinguish between the products of one's reasoning that are sensible given a particular context from those that are not. In addition, a theory is inconsistency tolerant, it would contain a contradiction and still be able to provide us with accurate and relevant measurements, predictions and explanations about a specific domain -this, without getting trivialized.

And while the project of searching for instances of inconsistency toleration in the sciences is clearly promising for both logicians and philosophers of science, it has not prospered as expected -at least for the logicians' side. Significant methodological mistakes have kept logicians away from the primary goal, which has always been to, first, understand the phenomenon of inconsistency toleration in the sciences, and, only later, to identify the logics, if any, that can help to scrutinize such a phenomenon. However, according to some philosophers, when doing so, logicians had lost sight of the original goal and ended up exclusively “proposing alternative logics that might lurk in the background of scientific reasoning” (Cf. Brown and Priest 20158. Brown, B. and G. Priest (2015): “Chunk And Permeate, A Paraconsistent Inference Strategy. Part I: The Infinitesimal Calculus”, Journal of Philosophical Logic 33: 379--88: 299. My emphasis); focusing their attention on their specific preferred logics and neglecting all evidence that might conflict with their philosophical commitments (Cf. Vickers 201329. Vickers, P. (2013): Understanding Inconsistent Science, Oxford University Press., Chap. 8).

With this in mind, the study of the presence of contradictions in the sciences has to provide explanations about (a) the legitimacy of the contradiction, this is, why is the 'paraconsistent' interpretation of a pair of propositions the most accurate interpretation of it; (b) the role that the contradiction plays either in a theory or in human reasoning and the way in which such a role justifies its toleration. And finally, it is necessary to provide an explanation of (c) which is the methodology behind a formal exploration of the consequences of such contradiction.

In what follows I show that (a)-(c) are not exclusive of the cases of inconsistency toleration in the sciences, but that in any other enterprise in which a paraconsistent interpretation of a phenomenon is addressed for formal purposes, it is mandatory to respond to them as well. In particular, I focus on the contradictory characterization of Christ made by Beall.

In sum, an important point regarding the similarities between Beall's approach and the works on inconsistent science is that, once Christology is characterized as a theory -of a scientific* spirit, it should be seen as an epistemic product significantly influenced by human agents. In particular, while theories might refer to mind-independent phenomena, the interpretations, the reconstructions and the uses of the theories are (at least, partially) constrained by agents' preferences and cognitive limitations. Even if not acknowledged in the book, this is a grounding constraint for Beall's view, especially given that, when choosing his approach, he had previously renounced the possibility of centering his proposal on religious rituals and practices justified in either dogma, solely revelation or any other mystical source.

The questions that I pose against Beall's view will assume the role that epistemic agents play in the identification, justification and acceptance of the contradictions associated to Christ's nature.

# 3. What is required for the identification of a contradiction?

To assert that Christ is an unproblematically contradictory being requires both the possibility of effectively identifying a contradiction and, at least, a tolerant attitude towards it. Regarding the former, when describing a contradiction, Beall takes a very intuitive approach to the matter saying that:

A formal contradiction is any sentence of the form:

it is true that x... and it is false that x ...

A contradictory being, as discussed above, is a being of whom some contradiction (per above) is true.

However, this characterization is not enough for explaining how we actually interpret certain elements of a particular theory in such a way that we can recognize them as a contradiction. This, in light of the fact that some of the examples that Beall uses to support his claim are not explicitly of this form, but have to be additionally interpreted as such. For instance, to identify as a contradiction the proposition “Christ possesses all of the limitlessness of God, and Christ possesses all of the limits of humans" requires an additional interpretation that makes explicit that possessing the limitlessness of God implies the falsity of possessing the limits of humans, and vice-versa.

One possible way to justify the straightforwardness of the contradictory interpretation is to say that the propositions' content in itself suffices for informing our recognition of them as contradictory. If adopting a view like this one, one would be an advocate of the 'material inference' approach (see Kapitan 198215. Kapitan, T. (1982). “On the concept of material consequence" History and Philosophy of Logic 3: 193-211., Read 1994, Brigant 20106. Brigandt, I. (2010). “Scientific reasoning is material inference: Combining confirmation, discovery and explanation", International studies in the philosophy of science 24(1): 31-43.); this is, inconsistency would just mean what

is being stated is impossible, and this does not come in 'weak' and 'strong' forms. On this view, when Ralph Kroning said 'electron spin' in 1925 this was indeed inconsistent with relativity. (...)The conflict follows from the material content of Kroning statement and does not depend on any logical form. (Vickers 201329. Vickers, P. (2013): Understanding Inconsistent Science, Oxford University Press.: 33)

Nonetheless, the main problem with the material content view is that in cases such as the Christ example, is that as the content of the propositions might vary from what we take it intuitively to be to what it actually means within the specific theory. As Christ is a very peculiar entity, it could be perfectly OK to assume that for this entity such properties do not conflict in any relevant sense -similarly to the way in which 'wave' and 'particle' do not conflict with each other when explaining the nature of of light in Quantum Mechanics but they would do it in classical theories. If something like this is the case, then the interpretation of these two propositions as a contradiction would be unjustified.

Another way to go when backing up the straightforwardness of the contradictory interpretation is to say that the logical form actually plays a significant role. Two of the main challenges that this alternative faces are to guarantee that, when we say “it is true that x... and it is false that x..." x actually means the same in both parts of the conjunction and that such conjunction is justified. As it has been recently pointed out by some philosophers of science, in many cases in which scientists have thought to identified a contradiction within their theory, when looking at it more closely, they have come to realize that it was just an apparent contradiction which resulted from, at least, one of the statements being simplified for practical purposes (cf. Vickers 201329. Vickers, P. (2013): Understanding Inconsistent Science, Oxford University Press., Davey 201412. Davey, K. (2014): “Can good science be logically inconsistent?”, Synthese ( S.I. Is Science Inconsistent? ) 191: 3009--3026.).

One of the most common examples of this is the alleged inconsistency in the Newtonian Early Calculus. According to the theory, “at different points in the calculation of a derivative infinitesimals had to be assumed to be both zero and non-zero" (Brown and Priest 2004: 379). This seems to be enough to justify a straight forward contradictory interpretation of infinitesimals; nonetheless, if one looks closely to what Newton had in mind when claiming this, one will realize that the inconsistency is only the result of a method that Newton developed for facilitating the operations within the theory but not the result of a characterization of infinitesimals as inconsistent entities (see Boyler 19495. Boyer, C.B. (1949). The history of the calculus and its conceptual development , New York Dover.: 193). “In other words, Newton says, exposition in terms of indivisibles or infinitesimals is simply a convenient shorthand" (Edwards 197913. Edwards, C. H. (1979). The historical development of the Calculus . New York: Springer-Verlag.: 226). Considering this, it has been suggested that the the use of 'is equal to zero' was not exactly the same in both parts of the alleged contradiction; in particular that the refined interpretation of Newton's instruction was that, at some points of a derivation, infinitesimals were to be different from zero and at some others, they were to be taken as if they were equal to zero (see Vickers 201329. Vickers, P. (2013): Understanding Inconsistent Science, Oxford University Press.: 182-1991). In addition, as the seemingly conflicting assumptions were used in different steps of the proof there was still the question of how justified their conjunction really was. Of course, there is a sense in which if one wants to broadly sketch the Newtonian method, it will seem like a globally inconsistent recipe, but in a more refined analysis, one will see that there is no actual domain that demands for the two propositions to be taken as true in the exact same context.

While there are going to be important dissimilarities between the calculus and the Christ case, the question still stands: how do we know that in the case of Christ the contradiction is not the result of (or at least, is not driven by) our linguistic limitations to consistently express the nature of Christ? For the case of Christ is obvious that if there is any simplification involved, which would be the source of the contradiction, this might not have been placed as an inferential shortcut, but maybe as either a heuristics for us to deal more easily with the analyzed phenomena or the result of our cognitive and linguistic limitations. If this being the case, it seems clear that the contradiction that emerges from our simplifications might not have any real effect on the nature of Christ.

# 4. How can we recognize a true contradiction from either an apparent or a temporal contradiction?

To engage in more detail with Beall's proposal, let's assume that the contradictions associated to Christ are indeed legitimate -this is, the elements of the contradiction actually conflict with each other and the conjunction is justified. Would this mean that they are true? Not necessarily.

Following the similarities with the researches carried out in the philosophy of science, one would see that the large majority of the contradictions that have been identified, even when legitimate, are very likely to not be true. Philosophers have largely agreed on the fact that ignorance plays an important role for determining when scientists can be rationally inclined to work with inconsistent information -in non purely formal disciplines. And when doing so, they have generally appealed to the following:

1. When having two scientific statements that contradict each other, scientists tend to assume that, at least, one of them is false (Laudan, 197718. Laudan, L. (1977): Progress and its Problems . Ewing, NJ: University of California Press.: 56).

2. If scientists are able to distinguish which of the conflicting propositions should be regarded as false -due to being part of idealizations, fictions, among others-, then they would be able to explain how they could satisfactorily work on seemingly false information.

3. However, most of the time, when confronted with an inconsistent set of information, scientists ignore, at least, which of the mutually contradictory statements should be regarded as false (cf. Bueno, 199710. Bueno, O. (1997): “Empirical Adequacy: A Partial Structures Approach”, Studies in History and Philosophy of Science 28:585--610, 2006; Brown, 19907. Brown, B. (1990): “How to be realistic about inconsistency in science”, Studies in History and Philosophy of Science 21 (2): 281--294.; Priest, 2002).

4. Once this ignorance is acknowledged, if scientists have no better alternative to the inconsistent set of propositions, the toleration of the contradiction becomes the only option at hand -such a tolerant attitude towards contradictions is often seen by scientists as a temporary resource.

Call this the generic explanation. (Martínez-Ordaz 202020. Martínez-Ordaz, M. del R. (2020): “The ignorance behind inconsistency toleration”, S.I. Knowing the unknown, Synthese .: 2)

In light of the first premise of the generic explanation, the legitimate contradictions found in scientific practice are often expected to be at least partially false. And in light of the fourth premise of the explanation, inconsistent theoretical representation of phenomena are only acceptable in absence of equally virtuous consistent alternatives.

Beall's proposal deals with premises 1 and 4 simultaneously when discussing the epistemic mystery strategy.

Epistemic-mystery strategies, sometimes ‘mysterian’ strategies, involve a firm twofold commitment to the standard theory of logical consequence(...) together with an elaborate epistemological story to the effect that our current epistemic situation cannot but see the apparent contradictions in any viable candidates for the true (and sufficiently complete) christology (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.:145)

In a nutshell: Christ appears to be contradictory; the appearance is

unavoidable in any available candidate for the true and sufficiently complete theory of Christ; but the theory is perfectly acceptable by standard norms because the apparent contradiction, though inevitable (in theories that we can formulate and understand), is only apparently contradictory; the apparent contradiction is due to equivocation the unwrapping of which is beyond our ken. (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.:146)

The similarities between the epistemic mystery strategy and the generic explanation include the role that (certain degree of) ignorance plays for the temporal tolerance of contradictions as well as the methodological importance of considering consistent alternatives to the inconsistent theory.

Beall's response to these concerns rests on the epistemically virtuous character of both inconsistent Christology and the contradictory nature of Christ.

• On the one hand, while it is common for humans to be mistaken about what seems to be obscure and seemingly inaccessible, we are very likely to be correct when asserting things that are obvious to us. In line with this, Beall says that “there’s an old truism that if something looks like a duck, sounds like a duck, behaves like a duck, then, well, it’s most probably a duck. One value of the saying is a methodological reminder: the best explanation of an appearance is often that the appearance is veridical" (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.: 147). Due to the reliability of our judgments about things that are obvious, the spirit of a heavy ignorance mediating the contradiction of Christ is dismissed. And appealing to simplicity, the epistemic superiority of the contradictory Christology is stated -if the contradictory nature of Christ is the most obvious interpretation of what is going on, we are very likely to be correct about it. Furthermore, if the nature of Christ is most likely to be contradictory, any theoretical approach that aims at representing Christ accurately must recognize his contradictory character.

• On the other hand, appealing to neutrality, Beall contends that “Contradictory Christology is neutral with respect to the true epistemology, or at least far closer to neutrality than any epistemic-mystery strategy can sustain."(Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.: 148). With this in mind, contradictory Christology might not only be the most simple answer to the problem but the most robust approach to it as it will stand regardless which is discovered to be the true epistemology in the long run.

While Beall's response is interesting and seemingly intuitive, it still has two significant problems: first, we have an infinite number of instances that illustrate how our impressions of what is obvious, given our intuitions or our senses' reports, etc., might be very much mistaken. Second, we have overwhelming evidence in favor of the implausibility of true contradictions.

Take the first problem. Beall's account of obviousness seems to assume that our doxastic commitment with the legitimacy of the contradiction is of a very strong type. I take the idea behind Beall's stand point to be that we have critically and exhaustively examined the different (consistent and inconsistent) interpretations of what it means for Christ to be contradictory and we have reached the conclusion that to accept the contradictory nature of Christ is not only the most intuitive option, but actually the only one that enables our achievement of explanatory knowledge and understanding of Christ.

Now, take the later epistemic achievement, understanding. Understanding has been traditionally considered to “consist of knowledge about relations of dependence. When one understands something, one can make all kinds of correct inferences about it” (Ylikoski 201316. Ylikoski, P. (2013): “The Illusion of Depth of Understanding in Science”, in H. De Regt, S. Leonelli and K. Eigner (eds.) Scientific Understanding: Philosophical Perspectives, Pittsburgh University Press: 100-119.: 100). In addition, understanding is often regarded as factive, this is, the content of understanding can only include true propositions. This considered, having the impression of understanding something that is knowingly imprecise, incoherent or false is called the ‘illusion of depth of understanding’ (see Ylikoski 201316. Ylikoski, P. (2013): “The Illusion of Depth of Understanding in Science”, in H. De Regt, S. Leonelli and K. Eigner (eds.) Scientific Understanding: Philosophical Perspectives, Pittsburgh University Press: 100-119., 2017). While such an illusion is clearly a mental confusion, according to some, certain defective (conflicting, inconsistent, false, impossible) elements can facilitate understanding if and only if they provide scientists “with epistemic access to true information that is difficult or even impossible to discern otherwise” (Lawler 201919. Lawler, I. (2019): “Scientific understanding and felicitous legitimate falsehoods:. Synthese .: 26) −only in virtue of the true elements they shed light on.5 5 I focus on the case of understanding because it is often thought to be the ultimate epistemic goal of our intellectual activities; however, all what has been said here can be argued for knowledge and other lower epistemic goods that require truth.

Assuming that the contradictory nature of Christ actually enables our achievement of knowledge and understanding, there are two alternative ways to explain why this is the case: either it does so in the same way in which an abstraction of the solar system will enhance our understanding, mostly as being an epistemic instrument, or it does so because of it being true. The first option will not please Beall, because the role that Christ plays in the ontology of Christology is a fundamental one (this is, is part of its most primitive ontology), thus it does not seem correct to treat his nature as the result of a simplification --something that, in contrast, the supporter of the epistemic mystery strategy might very easily accept. Therefore, if the assumption of Christ being contradictory is as epistemically fruitful as Beall argues it most be due to it being true. And this is where the second problem comes to the discussion, namely, the implausibility of true contradictions.

In light of the above, the supporters of Beall's account should provide an additional (and stronger) explanation for the truth of the contradictions about the nature of Christ, which explains what is actually distinctive of this case when comparing it to the neatest cases from the sciences. If what has been said here is along the right lines, the question is still how can we recognize propositions about the nature of Christ as true contradictions -and not as apparent or temporal inconsistencies.

# 5. If we identify a true contradiction within a theory, where can we actually go from there?

Let's assume that there are some propositions about Christ that are both inconsistent and true, the mandatory question is which is the effect that this has on the theory, in particular, what does the contradictory Christ says about the logical consequence relation under which the theory is closed.

First, theories are constrained by consequence relations that allow us to entail the consequences of the theory (such as predictions, explanations, etc.) and prevent us from obtaining irrelevant stuff/absurdities/etc. Second, if a theory contains a contradiction, and the corresponding logical closure is explosive, the theory will be trivial.

But hold on! If the theory appears, for all we can see, contradictory and is also closed under classical logic, the theory is trivial: it contains all sentences of the language of the theory, including not only each and every heretical sentence (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.: 148)

Third, if the theory contains a contradiction, and the theory is not trivial, we would be inclined to infer (abductively) that the logical closure is not explosive. While this reasoning seems to ground a significant part of Beall's project, we shouldn't accept it so straightforward.

According to [Michael 201622. Michael, M. (2016): “On a “most telling” argument for paraconsistent logic", Synthese 193 (10).], paraconsistent logicians have provided a biased abductive argument to interpret the relation between what cases of inconsistent theories and the success of paraconsistent logics. “The idea here would be that there are interesting and productive inconsistent theories from which people do not infer random and unconnected conclusions; so, it might be thought, the logic they use does not licence such inferences" (Michael 201622. Michael, M. (2016): “On a “most telling” argument for paraconsistent logic", Synthese 193 (10).: 3356). This reasoning goes as follows: from a particular case that illustrates temporal inconsistency toleration, abductively one infers that the best explanation of this toleration is that, either the reasoning of the agents using the theory or the theory in question, were closed under a paraconsistent logical consequence relation. Leaving as the only future task for the logicians to determine which is the specific paraconsistent logic that allows to better explain the particular case. Call this the abductive argument (in favor of paraconsistency).

There are two main methodological problems associated to this argument:

• The presumption of logical explosion: “This argument turns on what people in fact infer or should infer, so builds in a normative aspect. The first question which needs to be raised concerns the status of the ‘should’ in the claim about whether they should have inferred random sentences from the theory" (Michael 201622. Michael, M. (2016): “On a “most telling” argument for paraconsistent logic", Synthese 193 (10).: 3357).

This has negative effects in two senses: on the one hand, it weakens the empirical (historical) adequacy of paraconsistentist explanations of inconsistency toleration. On the other hand, at a methodological level, it reveals an important bias that affects the legitimacy of the relationship between historical evidence and the applicability of some paraconsistent tools.

• The presumption of logical closure: The paraconsistent, especially the dialetheist, explanation takes logical triviality to be a challenge for inconsistency toleration basically because it assumes that human rationality is expected to obey logical principles, such as Principle of Explosion. However, at this point, there is significant literature arguing otherwise. Epistemic agents respond to inferential challenges, such as inconsistencies, using pragmatic reasoning strategies that help them to solve particular problems in specific contexts and that do not privilege determined theories of inference (Cf. Harman 198414. Harman, G. (1984). “Logic and Reasoning”, Synthese , Vol. 60, No. 1, Foundations: Logic, Language, and Mathematics, Part I, pp. 107-127.: 108, Michael 201622. Michael, M. (2016): “On a “most telling” argument for paraconsistent logic", Synthese 193 (10).: 3355-57).

So, at a methodological level, this abductive inference seems unjustified for two reasons. First, it relies heavily on empirical evidence that is never provided - regarding the logical closure of human cognition. And second, it assumes that all cases of tolerance to contradiction are, at least, structurally uniform, and therefore, the explanation of the mechanisms that allowed such tolerance in one specific case would be the same for any other case.

Beall's response to these complaints might be that, while one can grant that human rationality does not strictly obey logical principles, theories as abstract complex entities very well might. And so, the attention must focus on whether the contradictory Christology is a trivial theory or not. And as we have enough evidence of it not being trivial, we can move forward to investigate which are the structural constraints that allow for the theory to have at its core a contradictory entity and still be successful.

However, this response is still problematic. First of all, projects about exploring the logical constrains of (non-formal) theories are challenged by our cognitive limitations. While we might very well identify certain inferential processes, many more will remain episodically opaque to us, dooming fine grained analyses of the theories and their consequences (see Putnam 198126. Putnam, H. (1981). “The corroboration of theories”, in Hacking, I. (ed) Scientific Revolutions, Oxford, NY: Oxford University Press: 121-137.).

Furthermore, the contradictory Christology is an extremely peculiar theory among theories, as, given the object of its study, it aims at being as general and as total as possible.

When theorists aim to construct a true theory, they aim to construct as complete a theory as possible. In particular, the resulting theory should not only contain the initial thrown-in truths (e.g., that God is triune, that Christ has two natures, etc.); the theory should also contain whatever follows from the truths in the theory; ; it should contain all of the consequences of the theory’s claims. The question is: what is meant by ‘follows from’ and ‘consequences’ in this context? (Beall 20203. Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.:23)

This must, definitely, have an impact on the epistemic access that we might have to the theory's structural constraints. Having as a result that, as Harman(198414. Harman, G. (1984). “Logic and Reasoning”, Synthese , Vol. 60, No. 1, Foundations: Logic, Language, and Mathematics, Part I, pp. 107-127.) and Michael(201622. Michael, M. (2016): “On a “most telling” argument for paraconsistent logic", Synthese 193 (10).) have suggested epistemic agents will be able to only distinguish certain reasoning strategies that help them to solve particular problems in specific contexts and that do not privilege determined theories of inference. This takes us back to the initial concern about human reasoning.

If the theory of contradictory Christology is so complex that we cannot scrutinize it to its core, the only hints that we might have about its inferential constraints will be the ways in which agents reason with the theory's information, this is, the ways in which they use fragments of the theory. These common uses can be described in terms of sets of strategies or general procedures that are explanatory of the way in which it is possible to handle specific contradictions in order to avoid logical explosion.7 7 Such strategies are paraconsistent in the sense that they allow scientists to avoid logical explosion in an optimal way -recognizing that what is ‘optimal’ would depend on the own constraints of each of the cases that are being studied. These strategies suggest ways in which information could be broken apart and transmitted while following some inferential patterns. Even though these strategies often substantiate the general dynamics of certain logics; they are, most of the time, also logic-independent -this is, they are compatible with many and diverse logical consequence relations.

And so, by studying them we might only reach the conclusion that either the logical consequence relation of the theory is non-explosive or that agents have been able to, regardless of the theory's logical closure, use the theory in an non-explosive way.

The final question is, even if we identify a true contradiction within a theory, where can we actually go from there? How can we escape the constrained realm of agents' reasoning to say something more general about the inferential grounds of contradictory Christology and other inconsistent theories?

# 6. Concluding remarks

Beall's contradictory Christology faces a number of serious methodological flaws and, if they are not properly addressed, the proposal should be abandoned. While these objections seem to come from a different area of research, namely, philosophy of science, if neglected, they can undermine the scope of Beall's contribution in religious contexts. Here, I have dealt with three major concerns: first, the interpretation of any pair of propositions about the nature of Christ as a contradiction requires more methodological rigour; if not, the core thesis of Beall's account, that Christ is described through inconsistent propositions, is flawed (Sect. 3). Second, if there is no clear distinction between temporal and true contradictions, the case that Beall proposes in [The contradictory Christ] is only superficial. Finally, if not explained the role of human agents in recognizing and working with the contradictions about Christ, the contradictory Christology, and the logical projects that might emerge around it, are doomed.

# Acknowledgments

I am indebted to Moisés Macías-Bustos for his valuable and fruitful constant feedback. I owe special thanks to Jc for his always kind engagement with my concerns and critiques. Thanks also to Diderik Batens, Susana Gómez, Andrew Tedder, Jean Yves Beziau, and the anonymous referees for their valuable comments. Thanks to the audience at the symposium “Discussing The Contradictory Christ” (UNAM). Finally, thanks to the editors for their assistance and their understanding.

# References

• 1
Batens, D. (1998): “Paraconsistency and its relation to worldviews”, Foundations of Science, Volume 3, Issue 2: 259--283.
• 2
Batens, D. (2002): “In Defence of a Programme for Handling Inconistency”, in Inconsistency in Science , Kluwer Academic Publishers, Netherlands: 129--150.
• 3
Beall, Jc (2020). The Contradictory Christ, Oxford Studies in Analytic Theology.
• 4
Boccardi, E. and Macías-Bustos.M. (2017). “Contradictions in motion: Why they’re not needed and why they wouldn’t help”, HUMANA.MENTE Journal of Philosophical Studies, 10(32): 195-227.
• 5
Boyer, C.B. (1949). The history of the calculus and its conceptual development , New York Dover.
• 6
Brigandt, I. (2010). “Scientific reasoning is material inference: Combining confirmation, discovery and explanation", International studies in the philosophy of science 24(1): 31-43.
• 7
Brown, B. (1990): “How to be realistic about inconsistency in science”, Studies in History and Philosophy of Science 21 (2): 281--294.
• 8
Brown, B. and G. Priest (2015): “Chunk And Permeate, A Paraconsistent Inference Strategy. Part I: The Infinitesimal Calculus”, Journal of Philosophical Logic 33: 379--88
• 9
Brown, B. $\&$ G. Priest (2015): “Chunk and permeate II: Bohr’s Hydrogen Atom”, European Journal for Philosophy of Science Vol. 5, Issue 1: 1--18.
• 10
Bueno, O. (1997): “Empirical Adequacy: A Partial Structures Approach”, Studies in History and Philosophy of Science 28:585--610
• 11
Bueno, O. and S. French (2011): "How theories represent", The British Journal for the Philosophy of Science 62 (4): 857-894.
• 12
Davey, K. (2014): “Can good science be logically inconsistent?”, Synthese ( S.I. Is Science Inconsistent? ) 191: 3009--3026.
• 13
Edwards, C. H. (1979). The historical development of the Calculus . New York: Springer-Verlag.
• 14
Harman, G. (1984). “Logic and Reasoning”, Synthese , Vol. 60, No. 1, Foundations: Logic, Language, and Mathematics, Part I, pp. 107-127.
• 15
Kapitan, T. (1982). “On the concept of material consequence" History and Philosophy of Logic 3: 193-211.
• 16
Ylikoski, P. (2013): “The Illusion of Depth of Understanding in Science”, in H. De Regt, S. Leonelli and K. Eigner (eds.) Scientific Understanding: Philosophical Perspectives, Pittsburgh University Press: 100-119.
• 17
Lakatos, I. (1978): The Methodology of Scientific Research Programmes: Philosophical Chapters , Vol. 1. Cambridge University Press.
• 18
Laudan, L. (1977): Progress and its Problems . Ewing, NJ: University of California Press.
• 19
Lawler, I. (2019): “Scientific understanding and felicitous legitimate falsehoods:. Synthese .
• 20
Martínez-Ordaz, M. del R. (2020): “The ignorance behind inconsistency toleration”, S.I. Knowing the unknown, Synthese .
• 21
Meheus, J. (2002): “How to reason sensibly yet naturally from inconsistencies”, in Inconsistency in Science , Kluwer Academic Publishers, Netherlands: 151--164.
• 22
Michael, M. (2016): “On a “most telling” argument for paraconsistent logic", Synthese 193 (10).
• 23
Priest, G. (1987): In Contradiction: A Study of the Tranconsistent (1st edition), Clarendon Press. Oxford.
• 24
• 25
Priest, G. (2006): Doubt truth to be a liar . Oxford: Oxford University Press.
• 26
Putnam, H. (1981). “The corroboration of theories”, in Hacking, I. (ed) Scientific Revolutions, Oxford, NY: Oxford University Press: 121-137.
• 27
Šešelja, D. (2017): “Scientific Pluralism and Inconsistency Toleration”, Humana Mente 32: 1-29.
• 28
Smith, J. (1988): “Inconsistency and scientific reasoning”, Studies in History and Philosophy of Science Part A 19 (4):429-445.
• 29
Vickers, P. (2013): Understanding Inconsistent Science, Oxford University Press.
• 1
This research was supported by the Programa Nacional de Pós-Doutorado PNPD CAPES (Brazil) and by the UNAM-PAPIIT Project IN403719 “Intensionalidad hasta el final: un nuevo plan para la relevancia lógica”. This work is the result of the book symposium on Jc Beall's The Contradictory Christ.
• 2
I am fully aware of the fact that there is an ongoing philosophical debate about the methodology for determining the meaning of religious language, however, as Beall does not focus on such debate, I believe this will suffice for the purposes of the paper.
• 3
Thanks to Moisés Macías-Bustos, who helped me to give a better phrasing of my ideas on this point.
• 4
Principle of Explosion (PE) is one of the most characteristic principles of classical logic (and of any other explosive logic), it says that any (explosive) theory will trivialize if it contains at least one contradiction. A contradiction is a pair of propositions, where one is the negation of the other. A theory is trivial if it is possible to derive any proposition from it. Therefore, any inconsistent (explosive) theory will be trivial. A logical consequence relation is paraconsistent if it is non-explosive, this is, if it does not validate PE; and a formal theory is paraconsistent if, despite containing a contradiction, it is not trivial.
• 5
I focus on the case of understanding because it is often thought to be the ultimate epistemic goal of our intellectual activities; however, all what has been said here can be argued for knowledge and other lower epistemic goods that require truth.
• 6
In recent years, Boccardi and Macías-Bustos (2017)4. Boccardi, E. and Macías-Bustos.M. (2017). “Contradictions in motion: Why they’re not needed and why they wouldn’t help”, HUMANA.MENTE Journal of Philosophical Studies, 10(32): 195-227. have argued that not even the Hegelian theory of motion, the most famous case of a dialetheist empirical theory, is more successful predictively and explanatorily than its consistent rival, the Russellian account. This shows how implausible it is for an empirical theory to be successful while containing true contradictions.
• 7
Such strategies are paraconsistent in the sense that they allow scientists to avoid logical explosion in an optimal way -recognizing that what is ‘optimal’ would depend on the own constraints of each of the cases that are being studied.
• Article info
CDD: 501

# Publication Dates

• Publication in this collection
13 Dec 2021
• Date of issue
Oct-Dec 2021


text:
writing a line into a file..?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
steven777
Prole
Posts: 35
Joined: Tue Jul 12, 2016 4:48 am

writing a line into a file..?

so im trying to write a line into a file. i know what like i want to delete and replace but for some reason i just cant get the line to be removed and replaced...

the reason for this is user information updating on the server so the line contains serveral bits or data but im just going to re write the whole line.

right now im deleting the whole fine and re creating it... but i think this is going to be real bad when there are many users trying to update at once...

i just want the line to be removed and replaced ?? anyone have a way of doing this, i cant seem to find any reference maternal besides string library lol.

so what happens is when a payer updates it just replaces his info into the line(which is already indexed) i just have no way of re writing it,,,
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: writing a line into a file..?

Open your file (read)- then you read your file into a table, you replace the portion of the table with the data you want. Then you write that table back to the file (or a new file - whatever you want).

There are other things you can do. Generally I go with the brittle approach of just assuming that the data is going to be at line n, and amend my table at that n. But to handle a situation where a file could have data at different portions really you should be searching the table for the data you want to amend. But that will take time. So if you know for sure that the position of the data will not change. Then you go with the first. If a file is a bit more unclear where it will store the information you want then your need to search for it.

The code is slightly different depending on if you are working with a binary file or a text file. But the main thing to remember is to close the file stream. And pay attention to the type that you assign to the stream (read, write, read+write) Common got-cha with files is trying to write to a stream that is read and vice versa.

If the file is huge there are some weird errors you will get using the above method. But for something like a configuration file its not going to be a problem.

On something that has multiple writes, and you might have corruptions from re-writes at the same time you need to think about using a database to manage the data then your program talks to the database and makes requests to that instead of directly messing with a flat file. The advantage is the database can handle multiple access requests and avoid the problem of corruption like you would have with the flat file.

Then you are looking at your server configuration. How much ram do you have? how big is the file. Fastest way is to keep the database in memory - Riak is a good example of this. Very simple to use. It is nice for things like high-score lists, ect.. Anything where you need high-availability and speed.

Like on a server for example - you have clients that send there player position data and other commands that affect the game world. In return the client wants an update of the game world from the server. In a database were assume that your game has only one room to keep it simple.

The server would dispatch a update to each client that was accessing the server with the data that the client would use to run the game.
The advantage of using the database is you would have each clients position and what it was doing as keys in the database. Depending on the client connection each should receive a up-to date picture of what's happening across all the clients in a shared space.

I don't see how you could do this with flat files, not without errors anyway or reimplementing a database.
steven777
Prole
Posts: 35
Joined: Tue Jul 12, 2016 4:48 am

Re: writing a line into a file..?

so how do i insert it at the line? i cant find examples of it. i understand how it works.just not the function to delet a line and replace it lol.

in my server all of the players that have an account possible are loaded into a table at the start of the server so it can be handled fast. no need to keep opening and closing files. the tables are indexed at the same as the position was in the file, <--- thats how i know where my update line is, but i still need an example

i need an example of a basic script that could show me the insertion of a line. and also how to delet the line.
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: writing a line into a file..?

let me have a dig around... I think i have an xml writer somewhere.

but to give you a hint - you look at your file. Note the line where the data that you want to mess with lives. for example in my xml writer it was at a location of line 1085 in the file. I wrote that down.

Then in my lua script I loaded the file into the table, then I just did mytable[1065] = "the new data"

This then has updated your table, it was then just a matter of writing the table to the file.

Let me look for the script...
steven777
Prole
Posts: 35
Joined: Tue Jul 12, 2016 4:48 am

Re: writing a line into a file..?

i can edit the table values easy. i,m just not sure on the syntax for updating said line. one sec ill pull up somthing i think may work idk yet

edit:

i really wish

love.filesystem.write( name, data, size ) had a line number for insertion
steven777
Prole
Posts: 35
Joined: Tue Jul 12, 2016 4:48 am

Re: writing a line into a file..?

f = io.input ("test.txt")
repeat
s = f:read ("*l") -- read one line
if s then -- if not end of file (EOF)
print (s) -- print that line
end
until not s -- until end of file

f:close () -- close that file now

here is the stadard io libray for lua but its edited to show wht i want bellow

f = io.input ("test.txt")

s = f:read ("*l") -- read one line
repeat
index = index+1 -- an index number for each line
if index = slot then -- the line we want to change
f:write() <----- write the new data to the line
end
until not s -- until end of file

f:close () -- close that file now
Pangit
Party member
Posts: 148
Joined: Thu Jun 16, 2016 9:20 am

Re: writing a line into a file..?

Code: Select all

-- readline = the line number you want within the file test.txt
readline = 7

-- lines is the n-1 (where were are counting from 0 so its actually 2..)  We are telling the for loop how many times to cycle.
lines = readline - 2

-- the magic, iter is reading each line of the file in order on each cycle of the for loop.

iter = io.lines 'test.txt'

-- checking that there are enough lines in the file.

for i=0, lines do
if not iter() then
error 'Not enough lines in file'
end
end

line = iter()

-- print the line to the screen

print(line)

Problem with this is its great for reading.. writing not so hot.. your still looking at updating the table so far as I can tell then writing the file. But then its not clear from any of the documentation how to do this.

You can remove lines from a file...

Code: Select all

function remove( filename, starting_line, num_lines )
local fp = io.open( filename, "r" )
if fp == nil then return nil end

content = {}
i = 1;
for line in fp:lines() do
if i < starting_line or i >= starting_line + num_lines then
content[#content+1] = line
end
i = i + 1
end

if i > starting_line and i < starting_line + num_lines then
print( "Warning: Tried to remove lines after EOF." )
end

fp:close()
fp = io.open( filename, "w+" )

for i = 1, #content do
fp:write( string.format( "%s\n", content[i] ) )
end

fp:close()
end

-- this removes the first line in the file.
remove("test.txt",1,1)

That was from Rosetta stone, you could use this as a template to put your string into the table (content) before the write back..
https://www.rosettacode.org/wiki/Remove ... a_file#Lua

This was the technique I used in the XML writer program I couldn't find.

Here is your insert function...

Code: Select all

function justTheTip( filename, starting_line, num_lines, chord )
local fp = io.open( filename, "r" )
if fp == nil then return nil end

content = {}
i = 1;
for line in fp:lines() do
if i < starting_line or i >= starting_line + num_lines then
content[#content+1] = line
end
i = i + 1
end

if i > starting_line and i < starting_line + num_lines then
print( "Warning: Tried to remove lines after EOF." )
end

fp:close()
fp = io.open( filename, "w+" )

content[starting_line]=chord

for i = 1, #content do
fp:write( string.format( "%s\n", content[i] ) )
end

fp:close()
end

-- Ok so the first parameter is a file, second is the line number,
-- third is the number of lines after you want to erase, the final string is what you want to update the file with.

justTheTip("test.txt", 2, 0, "Denki Groove")

pgimeno
Party member
Posts: 2614
Joined: Sun Oct 18, 2015 2:58 pm

Re: writing a line into a file..?

Files are continuous binary streams of data. They are not organized in lines, but in sectors. If you need to insert or delete data in a file, *everything* that comes after that change must be rewritten to accommodate for the size variation. For example, if a file is 1GB long, and you want to delete a byte in position 200, then the byte at position 201 must be written to 200; the byte at position 202 must be written to 201, ... the byte at position 1GB-1 must be written to position 1GB-2, and finally the file must be truncated to 1GB-1. No way to do that without rewriting every sector starting from that position. And expanding a file is even harder.

No software I know allows you to replace a line in a file without rewriting it entirely. That includes editors: they rewrite the whole file every time you save.

If you need files organized in records of a certain length, that's what databases are about. Unfortunately, LÖVE doesn't include a database management system.
steven777
Prole
Posts: 35
Joined: Tue Jul 12, 2016 4:48 am

Re: writing a line into a file..?

ok so here is my new question. right now its updating one line at a time... now i need somthing new to update the whole file from the user data tables. see the saving code below(modified)

Code: Select all

	 function file_update( filename, index, iterations)

local fp = io.open( filename, "r" )
if fp == nil then return nil end

local content = {}

i = 1;
for line in fp:lines() do -- iterate threw lines
if i < index or i >= index + iterations then --if i =key < index or index is greater than index +iterations
content[#content+1] = line -- content = line at line index
end
i = i + 1
end

if i > index and i < index + iterations then -- warning/ error
print( "Warning: Tried to remove lines after EOF." )
end

fp:close()
fp = io.open(filename, "w+" )

local chord = string.format("%s%s%s%s%s%s%s%s%s",player_data_table.name[index],"|",player_data_table.pass[index],"|",player_data_table.auc[index],"|",player_data_table.prokey[index],"|",player_data_table.ip[index])

print(chord)
content[index]= chord

for i = 1, #content do
fp:write( string.format( "%s\n", content[i] ) )
end
fp:close()

end

i really dont want to have to use this to update the thing every now and then

-- or somthing like this to get it to save. i do like the ability to save an idividual line and will be used for important updates in other systems. possably

Code: Select all

function file_update_all(dt)
system_refresh_rate = system_refresh_rate + dt
if system_refresh_rate > system_refresh_ratemax then
system_refresh_rate = 0
for i = 1,#player_data_table.name do
file_update( "main_server_files/userdata.lst", i, 0)
end
end
end

so what im trying to do is load the full player table which is this ( player_data_table = { tabel,table,table } )

its timmed so say every 5 min it updates everyone at once. cutting down on response times.
steven777
Prole
Posts: 35
Joined: Tue Jul 12, 2016 4:48 am

Re: writing a line into a file..?

currently the code above runs fine. it does have to call the function to save for each object in the table so it iterates allot over the strings. anyone just have a way to do the whole file?

Who is online

Users browsing this forum: No registered users and 34 guests


text:
Math Help - Sequences

1. Sequences

Suppose that lim sn = s, with s > 0. Prove that there exist a real number N such that sn> 0 for all n > N.

2. Originally Posted by bearej50
Suppose that lim sn = s, with s > 0. Prove that there exist a real number N such that sn> 0 for all n > N.
a proof by contradiction should work. what if $s_n \le 0$ for all $n$? consider the cases $s_n = 0$ for all $n$ and $s_n < 0$ for all $n$ separately

3. In the definition of sequence convergence, set $\varepsilon = \frac{s}{2}$.
Then $\left( {\exists N} \right)\left( {\forall n > N} \right)\left[ {\left| {s_n - s} \right| < \varepsilon } \right]\, \Rightarrow \,s_n > \frac{s}{2} > 0$


text:
Topics covered in this section are:

Adding radical expressions with the same index and the same radicand is just like adding like terms. We call radicals with the same index and the same radicand like radicals to remind us they work the same as like terms.

We add and subtract like radicals in the same way we add and subtract like terms. We know that $3x+8x$ is $11x$. Similarly we add $3\sqrt{x}+8\sqrt{x}$ and the result is $11\sqrt{11}$.

Think about adding like terms with variables as you do the next few examples. When you have like radicals, you just add or subtract the coefficients. When the radicals are not like, you cannot combine the terms.

#### Example 1

Simplify:

• $2\sqrt{2}-7\sqrt{2}$
• $5\sqrt[3]{y}+4\sqrt[3]{y}$
• $7\sqrt[4]{x}-2\sqrt[4]{y}$
Solution

Part 1

 $2\sqrt{2}-7\sqrt{2}$ Since the radicals are like, we subtract the coefficients. $-5\sqrt{2}$

Part 2

 $5\sqrt[3]{y}+4\sqrt[3]{y}$ Since the radicals are like, we subtract the coefficients. $9\sqrt[3]{y}$

Part 3

The indices are the same but the radicals are different. These are not like radicals. Since the radicals are not like, we cannot subtract them.

For radicals to be like, they must have the same index and radicand. When the radicands contain more than one variable, as long as all the variables and their exponents are identical, the radicands are the same.

#### Example 2

• $2\sqrt{5n}-6\sqrt{5n}+4\sqrt{5n}$
• $\sqrt[4]{3xy}+5\sqrt[4]{3xy}-4\sqrt[4]{3xy}$
Solution

Part 1

 $2\sqrt{5n}-6\sqrt{5n}+4\sqrt{5n}$ Since the radicals are like, we combine them. $0\sqrt{5n}$ Simplify. $0$

Part 2

 $\sqrt[4]{3xy}+5\sqrt[4]{3xy}-4\sqrt[4]{3xy}$ Since the radicals are like, we combine them. $2\sqrt[4]{3xy}$

Remember that we always simplify radicals by removing the largest factor from the radicand that is a power of the index. Once each radical is simplified, we can then decide if they are like radicals.

#### Example 3

Simplify:

• $\sqrt{20}+3\sqrt{5}$
• $\sqrt[3]{24}-\sqrt[3]{375}$
• $\frac{1}{2}\sqrt[4]{48}-\frac{2}{3}\sqrt[4]{243}$
Solution

Part 1

 $\sqrt{20}+3\sqrt{5}$ Simplify the radicals, when possible. $\sqrt{4} \cdot \sqrt{5}+3\sqrt{5}$ Simplify. $2\sqrt{5}+3\sqrt{5}$ Combine like radicals. $5\sqrt{5}$

Part 2

 $\sqrt[3]{24}-\sqrt[3]{375}$ Simplify the radicals. $\sqrt[3]{8} \cdot \sqrt[3]{3}-\sqrt[3]{125} \cdot \sqrt[3]{3}$ Simplify. $2\sqrt[3]{3}-5\sqrt[3]{3}$ Combine like radicals. $-3\sqrt[3]{3}$

Part 3

 $\frac{1}{2}\sqrt[4]{48}-\frac{2}{3}\sqrt[4]{243}$ Simplify the radicals. $\frac{1}{2} \sqrt[4]{16} \cdot \sqrt[4]{3}-\frac{2}{3} \sqrt[4]{81} \cdot \sqrt[4]{3}$ Simplify. $\frac{1}{2} \cdot 2\sqrt[4]{3}-\frac{2}{3} \cdot 3 \sqrt[4]{3}$ $\sqrt[4]{3}-2\sqrt[4]{3}$ Combine like radicals. $-\sqrt[4]{3}$

In the next example, we will remove both constant and variable factors from the radicals. Now that we have practiced taking both the even and odd roots of variables, it is common practice at this point for us to assume all variables are greater than or equal to zero so that absolute values are not needed. We will use this assumption throughout the rest of this chapter.

#### Example 4

Simplify:

• $9\sqrt{50m^{2}}-6\sqrt{48m^{2}}$
• $\sqrt[3]{54n^{5}}-\sqrt[3]{16n^{5}}$
Solution

Part 1

 $9\sqrt{50m^{2}}-6\sqrt{48m^{2}}$ Simplify the radicals. $9\sqrt{25m^{2}} \cdot \sqrt{2}-6\sqrt{16m^{2}} \cdot \sqrt{3}$ Simplify. $9 \cdot 5m \cdot \sqrt{3}-6 \cdot 4m \cdot \sqrt{3}$ $45m\sqrt{2}-24m\sqrt{3}$ The radicals are not like, so they cannot be combined.

Part 2

 $\sqrt[3]{54n^{5}}-\sqrt[3]{16n^{5}}$ Simplify the radicals. $\sqrt[3]{27n^{3}} \cdot \sqrt[3]{2n^{2}}-\sqrt[3]{8n^{3}} \cdot \sqrt[3]{2n^{2}}$ Simplify. $3n\sqrt[3]{2n^{2}}-2n \sqrt[3]{2n^{2}}$ Combine the like radicals. $n\sqrt[3]{2n^{2}}$

We have used the Product Property of Roots to simplify square roots by removing the perfect square factors. We can use the Product Property of Roots ‘in reverse’ to multiply square roots. Remember, we assume all variables are greater than or equal to zero.

We will rewrite the Product Property of Roots so we see both ways together.

### PRODUCT PROPERTY OF ROOTS

For any real numbers, $\sqrt[n]{a}$ and $\sqrt[n]{b}$, and for any integer $n≥2$

$\sqrt[n]{ab}=\sqrt[n]{a} \cdot \sqrt[n]{b}$ and $\sqrt[n]{a} \cdot \sqrt[n]{b}=\sqrt[n]{ab}$

When we multiply two radicals they must have the same index. Once we multiply the radicals, we then look for factors that are a power of the index and simplify the radical whenever possible.

Multiplying radicals with coefficients is much like multiplying variables with coefficients. To multiply $4x \cdot 3y$ we multiply the coefficients together and then the variables. The result is $12xy$. Keep this in mind as you do these examples.

#### Example 5

Simplify:

• $(6\sqrt{2})(3\sqrt{10})$
• $(-5\sqrt[3]{4})(-4\sqrt[3]{6})$
Solution

Part 1

 $(6\sqrt{2})(3\sqrt{10}$ Multiply using the Product Property. $18\sqrt{20}$ Simplify the radical. $18\sqrt{4} \cdot \sqrt{5}$ Simplify. $18\cdot 2 \cdot \sqrt{5}$ $36\sqrt{5}$

Part 2

 $(-5\sqrt[3]{4})(-4\sqrt[3]{6}$ Multiply using the Product Property. $20\sqrt[3]{24}$ Simplify the radical. $20\sqrt[3]{8} \cdot \sqrt[3]{3}$ Simplify. $20\cdot 2 \cdot \sqrt[3]{3}$ $40\sqrt[3]{3}$

We follow the same procedures when there are variables in the radicands.

#### Example 6

Simplify:

• $(10\sqrt{6p^{3}})(4\sqrt{3p})$
• $(2\sqrt[4]{20y^{2}})(3\sqrt[4]{28y^{3}})$
Solution

Part 1

 $(10\sqrt{6p^{3}})(4\sqrt{3p})$ Multiply. $40\sqrt{18p^{4}}$ Simplify the radical. $40\sqrt{9p^{4}} \cdot \sqrt{2}$ Simplify. $40\cdot 3p^{2} \cdot \sqrt{2}$ $120p^{2}\sqrt{2}$

Part 2 When the radicands involve large numbers, it is often advantageous to factor them in order to find the perfect powers.

 $(2\sqrt[4]{20y^{2}})(3\sqrt[4]{28y^{3}})$ Multiply. $6\sqrt[4]{4 \cdot 5 \cdot 4 \cdot 7y^{5}}$ Simplify the radical. $6\sqrt[4]{16y^{4}} \cdot \sqrt[4]{35y}$ Simplify. $6\cdot 2y \cdot \sqrt[4]{35y}$ Multiply. $12y\sqrt[4]{35y}$

## 8.4.3 Use Polynomial Multiplication to Multiply Radical Expressions

In the next a few examples, we will use the Distributive Property to multiply expressions with radicals. First we will distribute and then simplify the radicals when possible.

#### Example 7

Simplify:

• $\sqrt{6}(\sqrt{2}+\sqrt{18})$
• $\sqrt[3]{9}(5-\sqrt[3]{18})$
Solution

Part 1

 $\sqrt{6}(\sqrt{2}+\sqrt{18})$ Multiply. $\sqrt{12}+\sqrt{108}$ Simplify. $\sqrt{4} \cdot \sqrt{3}+\sqrt{36} \cdot \sqrt{3}$ Simplify. $2\sqrt{3}+6\sqrt{3}$ Combine like radicals. $8\sqrt{3}$

Part 2

 $\sqrt[3]{9}(5-\sqrt[3]{18})$ Distribute. $5\sqrt[3]{9}-\sqrt[3]{162}$ Simplify. $5\sqrt[3]{9}-\sqrt[3]{27} \cdot \sqrt[3]{6}$ Simplify. $5\sqrt[3]{9}- 3\sqrt[3]{6}$

When we worked with polynomials, we multiplied binomials by binomials. Remember, this gave us four products before we combined any like terms. To be sure to get all four products, we organized our work—usually by the FOIL method.

#### Example 8

Simplify:

• $(3-2\sqrt{7})(4-2\sqrt{7})$
• $(\sqrt[3]{x}-2)(\sqrt[3]{x}+4)$
Solution

Part 1

 $(3-2\sqrt{7})(4-2\sqrt{7})$ Multiply. $12-6\sqrt{7}-8\sqrt{7}+4 \cdot 7$ Simplify. $12-14\sqrt{7}+28$ Combine like terms. $40-12\sqrt{7}$

Part 2

 $(\sqrt[3]{x}-2)(\sqrt[3]{x}+4)$ Multiply. $\sqrt[3]{x^{2}}+4\sqrt[3]{x}-2\sqrt[3]{x}-8$ Combine like terms. $\sqrt[3]{x^{2}}+2\sqrt[3]{x}-8$

#### Example 9

Simplify: $(3\sqrt{2}-\sqrt{5})(\sqrt{2}-4\sqrt{5})$

Solution
 $(3\sqrt{2}-\sqrt{5})(\sqrt{2}-4\sqrt{5})$ Multiply. $3 \cdot 2+12\sqrt{10}-\sqrt{10}-4 \cdot 5$ Simplify. $6+11\sqrt{10}-20$ Combine like terms. $-14+11\sqrt{10}$

Recognizing some special products made our work easier when we multiplied binomials earlier. This is true when we multiply radicals, too. The special product formulas we used are shown here.

### SPECIAL PRODUCTS

 Binomial Squares Product of Conjugates $(a+b)^{2}=a^{2}+2ab+b^{2}$ $(a+b)(a-b)=a^{2}-b^{2}$ $(a-b)^{2}=a^{2}-2ab+b^{2}$

We will use the special product formulas in the next few examples. We will start with the Product of Binomial Squares Pattern.

#### Example 10

Simplify:

• $(2+\sqrt{7})^{2}$
• $(4-2\sqrt{5})^{2}$
Solution

Be sure to include the $2ab$ term when squaring a binomial.

Part 1

 $\textcolor{red}{(a+b)^{2}}$$(2+\sqrt{3})^{2} Multiply, using the Product of Binomial Squares Pattern. \textcolor{red}{a^{2}+2ab+b^{2}}$$2^{2}+2 \cdot 2 \cdot \sqrt{3}+(\sqrt{3})^{2}$ Simplify. $4+4\sqrt{3}+3$ Combine like terms. $7+4\sqrt{3}$

Part 2

 $\textcolor{red}{(a-b)^{2}}$$(4-2\sqrt{5})^{2} Multiply, using the Product of Binomial Squares Pattern. \textcolor{red}{a^{2}-2ab+b^{2}}$$4^{2}-2 \cdot 4 \cdot 2\sqrt{5}+(2\sqrt{5})^{2}$ Simplify. $16-16\sqrt{5}+4 \cdot 5$ $16-16\sqrt{5}+20$ Combine like terms. $36-16\sqrt{5}$

In the next example, we will use the Product of Conjugates Pattern. Notice that the final product has no radical.

#### Example 11

Simplify: $(5-2\sqrt{3})(5+2\sqrt{3})$

Solution
 $\textcolor{red}{(a-b)(a+b)}$$(5-2\sqrt{3})(5+2\sqrt{3} Multiply, using the Product of Conjugates Pattern. \textcolor{red}{a^{2}-b^{2}}$$5^{2}-(2\sqrt{3})^{2}$ Simplify. $25-4 \cdot 3$ $13$