text:
# Find resistance of 0.1Ω resistor

#### k1ng 1337

Joined Sep 11, 2020
61
Hi,

I picked up a couple 0.1Ω 10w resistors to track current usage with an Arduino on a battery powered project but I don't have a precision ohmmeter, how can I extrapolate the resistance value? I only have a cheap multimeter and Arduino at my disposal and already I see a huge error ratio with the multimeter.

Thanks

#### MrChips

Joined Oct 2, 2009
23,071
This is not a trivial measurement to make. Contacts and cable resistance alone will result in inaccurate measurements.

#### Papabravo

Joined Feb 24, 2006
15,469
Hi,

I picked up a couple 0.1Ω 10w resistors to track current usage with an Arduino on a battery powered project but I don't have a precision ohmmeter, how can I extrapolate the resistance value? I only have a cheap multimeter and Arduino at my disposal and already I see a huge error ratio with the multimeter.

Thanks
Extrapolate is the wrong word for this situation and has nothing to do with what you are trying to accomplish. If you could measure data in another range and infer the resistance, that would be extrapolation. What you mean is how can I accurately measure the resistance of these resistors with the limited equipment that I have. The answer is you probably can't. The laboratory approach would be to obtain a precision voltage source and measure the current. You have neither a precision voltage source, nor a way to accurately measure small currents. I think the best you can do is put a bunch of them in series to get an average. What is the alleged tolerance on these guys ±10% -- hopefully.

Just for completeness, an example of extrapolation would be taking a set of collector characteristics for a transistor and using the slopes to infer the Early Voltage.

#### crutschow

Joined Mar 14, 2008
26,736
The usual way to measure small resistances is to put a known current through the resistance (such as 1A) and measure the voltage drop directly across the resistor (should be 100mV for a 0.1Ω resistor).
That's called a 4-wire measurement, which takes the wire resistances out of the measurement.

The current can be measured with the multimeter first with the power supply adjusted in the constant-current mode, so that the current doesn't change when you remove the multimeter to measure the voltage.

#### Papabravo

Joined Feb 24, 2006
15,469
The usual way to measure small resistances is to put a known current through the resistance (such as 1A) and measure the voltage drop directly across the resistor (should be 100mV for a 0.1Ω resistor).
That's called a 4-wire measurement, which takes the wire resistances out of the measurement.

The current can be measured with the multimeter first with the power supply adjusted in the constant-current mode, so that the current doesn't change when you remove the multimeter to measure the voltage.
Doing this with a 4 1/2 digit Fluke is different than doing it with a $5.99 Centek from Harbor Freight. #### crutschow Joined Mar 14, 2008 26,736 Doing this with a 4 1/2 digit Fluke is different than doing it with a$5.99 Centek from Harbor Freight.
That's obvious.
The Fluke may even have the 4-wire measurement built in.
But I have found those Harbor Freight meters to be fairly accurate when measuring voltage and current and will likely be sufficient for the TS's purposes.

#### Papabravo

Joined Feb 24, 2006
15,469
That's obvious.
But I have found those Harbor Freight meters to be fairly accurate when measuring voltage and current and will likely be sufficient for the TS's purposes.
Obvious only to the members of the cognoscenti.
I have also found them useful, but it remains to be seen if they are useful enough for the TS's purposes. He didn't mention anything about having a constant current supply with is also a requirement for this method.

Last edited:

#### djsfantasi

Joined Apr 11, 2010
7,551
how can I extrapolate the resistance value? I only have a cheap multimeter and Arduino at my disposal and already I see a huge error ratio with the multimeter.
Extrapolate is calculating an estimate of a value outside a range of data values. Interpolate is calculating an estimate of a value within a range of data values.

#### Audioguru again

Joined Oct 21, 2019
2,853
My meter's leads are 0.3 ohms when measured by themselves. Then if I measure a 0,1 ohm resistor it will show (0.1 + 0.3=) 0.4 ohms.

#### k1ng 1337

Joined Sep 11, 2020
61
The usual way to measure small resistances is to put a known current through the resistance (such as 1A) and measure the voltage drop directly across the resistor (should be 100mV for a 0.1Ω resistor).
That's called a 4-wire measurement, which takes the wire resistances out of the measurement.

The current can be measured with the multimeter first with the power supply adjusted in the constant-current mode, so that the current doesn't change when you remove the multimeter to measure the voltage.
I tried the 4-wire measurement prior, I was hoping to utilize the Arduino as it is the heart of the whole operation

I'll just have them measured next time I'm at the nerd shop

and thanks to everyone correcting my English my French is much worse

#### KeepItSimpleStupid

Joined Mar 4, 2014
4,556
You need to do 4-terminal or kelvin type measurements which means you need to measure the current through it and the voltage across it. Values as low as this might actually be a 4-terminal resistor.

#### k1ng 1337

Joined Sep 11, 2020
61
Obvious only to the members of the cognoscenti.
I have also found them useful, but it remains to be seen if they are useful enough for the TS's purposes. He didn't mention anything about having a constant current supply with is also a requirement for this method.
No I don't have a power supply yet, I've been working with 5v usb and battery power.

Realistically speaking is resistor in series with a battery a current source? Ignoring changes in voltage over time due to discharge I could use the multimeter to find resistance, current and voltage then use some resistor network and ohms law to find my resistor value. It was this thinking that inspired this thread.. how did the pioneers find these values using primitive methods.. after all it was their work their forged todays benchmarks.

#### MikeA

Joined Jan 20, 2013
253
to track current usage with an Arduino on a battery powered project
How much current? The resistor might get hot enough to change it's own resistance.

#### Papabravo

Joined Feb 24, 2006
15,469
No it's not. The battery and resistor will put out different currents with the meter in the circuit and the meter out of the circuit, because you are changing the total resistance across the voltage source. the whole idea of a constant current source is to put out a constant current regardless of the actual load. Of course Ohms law will require a certain voltage across the load is that is the case and that is precisely what you want beeause the high impedance voltmeter will have only a small effect on the parallel combination of 20K or more in parallel with 0.1Ω

#### crutschow

Joined Mar 14, 2008
26,736
You could add an accurate resistor in series with the 0.1Ω resistor to give about 1A current with the supply or battery you have.
You then measure the voltage across the large resistance to get the current and the 0.1Ω resistor to get its resistance.

#### ElectricSpidey

Joined Dec 2, 2017
1,531
I push the zero ohm button on my trusty old Micronta.

#### MrChips

Joined Oct 2, 2009
23,071
As pointed out, you can do this using the 4-wire measurement method.

Here is a similar technique along the same idea using a battery, resistor and your DMM.
Firstly, you need a known low resistance. For example, suppose you have a 1Ω ±10% resistor.
You create a circuit with your battery in series with the 1Ω resistor R1 and your 0.1Ω DUT R2 (device under test).

With your DMM in voltage range, measure the voltage V1 across R1 and V2 across R2.
By Ohm's Law analysis:

I = V1 / R1 = V2 / R2

R2 = R1 x V2 / V1

independent of the voltage of the battery.

#### Papabravo

Joined Feb 24, 2006
15,469
Make sure the resistor can handle the power, in watts, that will be delivered by the battery. I'd be a bit reluctant to take 1 Ω resistor for a test drive without knowing something about the batteries capabilities.

#### MrChips

Joined Oct 2, 2009
23,071
Yes, I intentionally left out the gory details for the uninitiated to discover.

For, example, don't expected this to work with any conventional battery.
A 9V battery, for example, cannot deliver 9A!

Ideally, you want R1 and R2 to be about the same order of magnitude.
You can insert an additional resistor R3 in series to limit the current. It is not necessary to know the value of this resistor.

#### Papabravo

Joined Feb 24, 2006
15,469
Yes, I intentionally left out the gory details for the uninitiated to discover.

For, example, don't expected this to work with any conventional battery.
A 9V battery, for example, cannot deliver 9A!

Ideally, you want R1 and R2 to be about the same order of magnitude.
In particular -- don't try this with a 1Ω 1/2 watt resistor. A standard D-cell has more than enough energy to give the 1/2 watt resistor a smoking headache


text:
ISSN 1000-1239 CN 11-1777/TP

• 信息安全 •

### 基于沙普利值计算的区块链中PoS共识机制的改进

1. 1(山东大学计算机科学与技术学院 济南 250000);2(山东大学软件学院 济南 250000) (sdnulyr@126.com)
• 出版日期: 2018-10-01
• 基金资助:
国家自然科学基金重点项目(61632020)；国家自然科学基金项目(61572294，61602287)；山东省自然科学基金项目(ZR2017MF021)；山东省重点研发计划(2018GGX101037)；山东省科技重大创新工程项目(2018CXGC0702)；中央高校基本科研业务费专项资金项目(2017JC019)；山东省高等学校科学技术计划项目(J15LN16)

### Improvement of the PoS Consensus Mechanism in Blockchain Based on Shapley Value

Liu Yiran1, Ke Junming1, Jiang Han2, Song Xiangfu1

1. 1(School of Computer Science and Technology, Shandong University, Jinan 250000);2(Software College, Shandong University, Jinan 250000)
• Online: 2018-10-01

Abstract: Blockchain has attracted much attention for its decentralization, tamper-proof, easy to verify and other notable advantages. But for the blockchain, its most fundamental attribute is decentralization. This requires a good consensus mechanism to be established. At present, the common consensus mechanisms include the proof-of-work (PoW) consensus mechanism, the proof-of-stake (PoS) consensus mechanism, the proof-of-activity (PoA) consensus mechanism, and so on. However, these consensus mechanisms didn’t give a specific scheme for the reward distribution of participating nodes. Based on the principle of calculating Shapley value in Game Theory, this paper improves the distribution of reward in the mechanism of the PoS consensus mechanism, makes the reward distribution of the nodes participated in the generated block in the PoS mechanism more fair and reasonable, and it can also reverse the social stratification in the blockchain, thus greatly improving the possibility of the new small node gaining the benefit. In addtion, we apply the same ideas in the Ouroboros protocol to improve its revenue distribution algorithm so that it satisfies survivability and durability.

format: plain


text:
Tag Info

New answers tagged libertine

2

The glyphs are not supported by Libertine in TS1 encoding. Why? I don't know. However in the log file you find Missing character: There is no <B4> in font LinLibertineT-tlf-ts1! Missing character: There is no <80> in font LinLibertineT-tlf-ts1! Missing character: There is no <80> in font LinLibertineT-tlf-ts1! Missing character: There is ...

2

You want to change the digits in math mode: \documentclass[ a4paper, final, 12pt, numbers=noendperiod, BCOR=5.00mm, bibliography=totoc, listof=totoc, headinclude ]{scrreprt} \usepackage[oldstyle]{libertine} \usepackage[scaled=.83]{beramono} \usepackage[libertine]{newtxmath} \usepackage{hyperref} ...

4

You can change all counters using arabic numbers into oldstyle arabic numbers by re-defining the inner macro \@arabic. As well, I provided \Arabic which gives the standard arabic numbering, so for instance, if you wanted enumerate to use standard digits, you can do \renewcommand*\theenumi{\Arabic{enumi}}. However, there is some trouble with page counter and ...

Top 50 recent answers are included


text:
# Tag Info

7

Add a \strut or define text depth for those nodes. I have also changed above leftto left and above right to right appropriately. \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{automata,arrows,calc,positioning} \begin{document} \begin{tikzpicture}[->,node distance=25mm] \node[state,initial,accepting] (q0) {$q_0$}; ...

5

As first thing, I would add the options text height=1ex, text depth=0pt in the tikzpictures option to force all labels having the same (vertical) size. Having done this, the problems As you can see, the 'b' on the arrow from q1 to q3 is positioned lower than the 'a, b, c' on the arrow from q3 to q2. Also, the 'b' on the edge from q2 to q3 is ...

4

As it stands, your document does not contain enough text for LaTeX to put the figure at the top of a page. On the first page, floats at the top are banned. There is no second page (of text). So, having the figure left at the end of the document, LaTeX does whatever it must to place it: it puts it on a page of floats and, by default, that means the floats are ...

4

For this case, I would replace toggle enlargement by some direct code: \documentclass[12pt]{memoir} \usepackage{calc,lipsum} \usepackage[T1]{fontenc} %---------------------------------------------------------------% \setstocksize{297mm}{210mm} \settrimmedsize{\stockheight}{\stockwidth}{*} \settypeblocksize{247mm}{120mm}{*} ...

3

Your description isn't so clear, but perhaps this. Note you should avoid \ in math mode, and don't use math italic for multi-letter works such asmaxand just use\text` for text phrases, not math operators. Also, please always post complete documents. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &\min \mu \\ ...

3

You can adjust the settings with \@totalleftmargin: \documentclass[12pt]{memoir} \usepackage{calc,lipsum} \usepackage[T1]{fontenc} %---------------------------------------------------------------% \setstocksize{297mm}{210mm} \settrimmedsize{\stockheight}{\stockwidth}{*} \settypeblocksize{247mm}{120mm}{*} \setulmargins{25mm}{*}{1} ...

2

Styles can greatly improve readability. Here's a proof of concept using only styles. The idea is to define a <name-of-node>pos style for each named node so that you can specify positioning by defining this style using keys like at or left etc, separately from the point of creation of the nodes. \documentclass{standalone} \usepackage{tikz} \tikzset{ ...

2

You can adjust the list environments to compensate. I've used enumitem to simplify this. I've also used memoir's facilities to set the margin notes up, which you should certainly do. (No point having it fix the layout if you then go and immediately mess it up again!) \documentclass[12pt]{memoir} \usepackage{calc,enumitem,lipsum} \usepackage[T1]{fontenc} ...

1

A combination of \par and \medskip (or the combining command \medskip) will give you, what you want. You can define an environment for that as shown in this nice answer. % arara: pdflatex \documentclass{article} \usepackage{blindtext} % for dummy text \usepackage{multicol} \usepackage{microtype} % for nice typesetting in narrow columns ...

1

Without more specifications, two minipages are enough: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[htp] \centering \includegraphics[height=.3\textheight]{example-image-16x9}\\[1em] \begin{minipage}[c]{.3\linewidth} \includegraphics[width=\linewidth]{example-image-a}\\[1em] ...

1

I use a combination of the \stackrel and \phantom commands. In particular \newcommand{\rz}[1]{\stackrel{#1}{\phantom{.}}} seems to work well (i.e. looks pretty natural) in many cases. If you want precise control, I suppose you can replace the \phantom{.} with \phantom{\begin{minipage}{0.001\textwidth}\vspace{#2}\end{minipage}} Then the #2 argument ...

1

Percusse's answer helped me a lot, but the colorbar was not placed perfectly aligned to my plot. I made a slight modification, which works without using an extra \node and without static widths. This is done by placing the colorbar with colorbar style. The colorbar is finally displayed by \pgfplotscolorbarfromname{commonbar}. \documentclass{standalone} ...

1

\documentclass{article} \makeatletter \newcommand{\ch}[1]{% \leavevmode\@bsphack \raisebox{2ex}{\makebox[0pt][l]{\small\bfseries\strut#1}}\nolinebreak \@esphack } \makeatother \begin{document} \begin{verse} \ch{G}.. Mamma take this \ch{D}badge from \ch{Am7}me\\ \ch{G}.. I can't use\ch{D} it any \ch{C}more\\ \ch{G}.. It's getting \ch{D}dark, too dark ...

1

You could use TiKZ to create an overlay image that does not disturb the rest of the layout. I don't know what packages you used to create the screenshot above, so I could not reproduce exactly your layout. That is one of the reasons why we insist on providing a minimum working example, (MWE) -- see my comment above. The following should get you started ...

1

[More of a comment, but to move off the unanswered list] With the standard document classes, loading dblfloatfix would allow some flexibility here. However, as you are using REVTeX that does not work (you can load the package but it has no effect). The best that you can do is miss out the positional arguments entirely: LaTeX will then at least be able to ...

1

This happens because the bemaer column system uses the LaTeX minipage behind the scenes: a vertical box. As these are not set with a fixed height they don't stretch, in contrast to setting a frame where beamer does some resizing (so the stretch is important). For a one-off application I'd be tempted to use a raw minipage and adjust as require. For example ...

Only top voted, non community-wiki answers of a minimum length are eligible


text:
DMRcate cpg.annotate error
1
1
Entering edit mode
@giovanni-calice-6415
Last seen 6 months ago
Italy

Hi all,

I am using DMRcate to find differentially methylated regions in illumina 450k data between one group of 4 samples and another group of 9 samples.

I followed all the steps of DMRcate user's guide and I build the design matrix in a similar manner,

and this is it:

str(design)
num [1:13, 1:14] 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "dimnames")=List of 2
..$: chr [1:13] "1" "2" "3" "4" ... ..$ : chr [1:14] "(Intercept)" "patient020" "patient021" "patient023" ...
- attr(*, "assign")= int [1:14] 0 1 1 1 1 1 1 1 1 1 ...
- attr(*, "contrasts")=List of 2
..$patient: chr "contr.treatment" ..$ type   : chr "contr.treatment"

But when I call the cpg.annotate(), I have this error:

myannotation <- cpg.annotate(myMvalue, analysis.type = "differential", design = design, coef = 14)
Coefficients not estimable: typeGroup2
Error in ebayes(fit = fit, proportion = proportion, stdev.coef.lim = stdev.coef.lim,  :
No residual degrees of freedom in linear model fits
Inoltre: Warning message:
Partial NA coefficients for 425827 probe(s)

In the DMRcate example dataset, that I have tested, the differential analysis is paired 38 vs 38

and I think that the error probably is in the design matrix building of my dataset.

So how to set the design matrix correctly?

Giovanni

dmrcate design matrix • 1.4k views
1
Entering edit mode
Tim Peters ▴ 120
@tim-peters-7579
Last seen 4 months ago
Australia

Hi Giovanni,

You're right, there is definitely a problem with the design matrix, especially one that has 14 columns when you only have 13 samples. This means that limma is interpreting each sample as having its own phenotype, hence none have replicates, and therefore you don't have any residual degrees of freedom in the model, just like the error says.

What you need to do is create a vector describing the groups you want to contrast, corresponding to the matching columns in your M-matrix. Say the first 4 columns are group 1 and the remaining 9 columns are Group 2.

So to calculate DMRs that are Group 2 - Group 1, input like so, and make sure the coef argument corresponds to the column of the design matrix which contains the contrasts of interest, i.e. 2. :

> type <- c(rep("1", 4), rep("2", 9))
> type
[1] "1" "1" "1" "1" "2" "2" "2" "2" "2" "2" "2" "2" "2"
> design <- model.matrix(~type)
> design
(Intercept) type2
1            1     0
2            1     0
3            1     0
4            1     0
5            1     1
6            1     1
7            1     1
8            1     1
9            1     1
10           1     1
11           1     1
12           1     1
13           1     1
attr(,"assign")
[1] 0 1
attr(,"contrasts")
attr(,"contrasts")$type [1] "contr.treatment" myannotation <- cpg.annotate(myMvalue, analysis.type = "differential", design = design, coef = 2) Good luck, Tim ADD COMMENT 0 Entering edit mode Hi Tim, Many Thanks, It works fine! In particular I had already tried to build the matrix by myPhenoData$Sample_Group

used to calculate DMPs, but I wrong in the coef argument in cpg.annotate call

(coef = 14)

having again error. Maybe I misinterpreted the cpg.annotate call in the paired analysis of example dataset.

Then using the coef argument

(coef = 2)

that reflects my originary

myPhenoData$Sample_Group I got DMRs and this is the design matrix:  (Intercept) myPhenoData$SampleGroup
1            1                            0
2            1                            0
3            1                            0
4            1                            0
5            1                            0
6            1                            0
7            1                            0
8            1                            0
9            1                            0
10           1                            1
11           1                            1
12           1                            1
13           1                            1
attr(,"assign")
[1] 0 1
attr(,"contrasts")
attr(,"contrasts")$myPhenoData$SampleGroup
[1] "contr.treatment"

Good luck,

Giovanni


text:
## Indices with brackets and powers

Note:The words powers, exponents and indices all mean the same thing. We will now examine what happens when we raise numbers in brackets to a power.

The a represents the number in the bracket while the m and n represent the two powers (one inside and one outside of the bracket). Here is an example in which this rule is applied. Example: In this example, the powers were multiplied together to give the answer which is 3 to the power of 6. How to do brackets to a power. Indices and brackets. Otherwise known as parentheses. Multiplying powers. If you learnt something new and are feeling generous Expanding brackets with powers Powers or index numbers are the floating numbers next to terms that show how many times a letter or number has been multiplied by itself. For example, and. Using In general: This formula tells us that when a power of a number is raised to another power, multiply the indices. This is the fourth index law and is known as the Index Law for Powers. In general, we have for any base a and indices m and n: (a m) n = a mn. Raising a Product to a Power. Number example: (5 × 2) 3 = 5 3 × 2 3. In this case, with numbers, it would be better to perform the multiplication in brackets first and then raise our answer to the power 3. This feature is not available right now. Please try again later. Negative indices are all exponents or powers that have a minus sign in front of them and are as result negative. They are quite easy to deal with as there is only one thing that you have to do. They are quite easy to deal with as there is only one thing that you have to do.

## 4 Jun 2019 Product of powers: Add powers together when multiplying like bases First, redistribute the power to the inside of the brackets, following the

The a represents the number in the bracket while the m and n represent the two powers (one inside and one outside of the bracket). Here is an example in which this rule is applied. Example: In this example, the powers were multiplied together to give the answer which is 3 to the power of 6. How to do brackets to a power. Indices and brackets. Otherwise known as parentheses. Multiplying powers. If you learnt something new and are feeling generous Expanding brackets with powers Powers or index numbers are the floating numbers next to terms that show how many times a letter or number has been multiplied by itself. For example, and. Using In general: This formula tells us that when a power of a number is raised to another power, multiply the indices. This is the fourth index law and is known as the Index Law for Powers. In general, we have for any base a and indices m and n: (a m) n = a mn. Raising a Product to a Power. Number example: (5 × 2) 3 = 5 3 × 2 3. In this case, with numbers, it would be better to perform the multiplication in brackets first and then raise our answer to the power 3. This feature is not available right now. Please try again later.

### Always remove brackets first. Example 11. Simplify each of the following: Solution : Key Terms. index law for powers

Powers of brackets can be expanded using the distributive law. This property is shown below: \begin{align*} (x \times y)^n = x^n \times y^n \end{align*}. Indices: powers/Surds. Multiplication. Division. Addition. Subtraction. Order of calculations: 1st: Solve any brackets. 2nd: Solve any power/indices. 3rd: Solve any

### Negative indices are all exponents or powers that have a minus sign in front of them and are as result negative. They are quite easy to deal with as there is only one thing that you have to do. They are quite easy to deal with as there is only one thing that you have to do.

order of operations > when to work out powers > brackets and powers. worksheets. bidmas This section covers Indices and the uses of Indices in algebra. After studying this section, you will be able to: divide and multiply algebraic expressions using indices; find roots using indices. This video shows a guide to indices and powers. Multiplying and dividing indices, raising indices to a power and using standard form are explained. Indices or Powers mc-TY-indicespowers-2009-1 A knowledge of powers, or indices as they are often called, is essential for an understanding of most algebraic processes. In this section of text you will learn about powers and rules for manipulating them through a number of worked examples. 3D shapes Adding algebraic fractions Adding and subtracting vectors Adding decimals Adding fractions Adding negative numbers Adding surds Algebraic fractions Algebraic indices Algebraic notation Algebraic proof Alternate angles Alternate segment theorem Angle at the centre Angle in a semi-circle Angles Angles at a point Angles in a polygon RULES FOR INDICES; BRACKETS AND FACTORISING; SOLVING EQUATIONS; REARRANGING FORMULAE; ALGEBRAIC PROOF; INEQUALITIES; Brackets with all Four Operations [First Steps] BiDMAS. Squares and Cubes [First Steps] Powers of Two and Ten. NEW [First Steps] Squares and Cubes. NEW [Strengthen] Powers of Two and Ten. NEW Exponents are also called Powers or Indices. Let us first look at what an "exponent" is: The exponent of a number says how many times to use the number in a multiplication. In this example: 8 2 = 8 × 8 = 64. In words: 8 2 can be called "8 to the second power", "8 to the power 2" To add or subtract with powers, both the variables and the exponents of the variables must be the same. You perform the required operations on the coefficients, leaving the variable and exponent as they are. When adding or subtracting with powers, the terms that combine always have exactly the same variables with exactly the same […]

## Note:The words powers, exponents and indices all mean the same thing. We will now examine what happens when we raise numbers in brackets to a power.

Always remove brackets first. Example 11. Simplify each of the following: Solution : Key Terms. index law for powers  Expanding brackets with powers. Powers or index numbers are the floating numbers next to terms that show how many times a letter or number has been  The third law: brackets. find roots using indices. This video shows a guide to indices and powers. Multiplying and dividing indices, raising indices to a power and using standard form are  When a number written in exponential notation is raised to a power, it is called a “ power of a power.” In this expression, the base is 52 and the exponent is 4: 52 is

Negative indices are all exponents or powers that have a minus sign in front of them and are as result negative. They are quite easy to deal with as there is only one thing that you have to do. They are quite easy to deal with as there is only one thing that you have to do. This formula tells us that when a power of a number is raised to another power, multiply the indices. This is the fourth index law and is known as the Index Law for Powers. Example 10 Solution: Note: Always remove brackets first. Example 11. Simplify each of the following: Solution: Key Terms. index law for powers Indices (Powers) & Roots The superscript numbers (2, 3 & 4 above) are known as indices or powers. When the power is 2 we say “squared”, when the power is 3 we say “cubed” and for all other powers power outside of a bracket you multiply the powers. (45)2=410


text:
Generation of clock signals

Inside a computer, a crystal oscillator sends signals to a microcontroller or microprocessors. I want to know if the crystal oscillator is increasing the frequency or generating pulses. My questions are:

1) Clock rates of computers are high which means crystal oscillator's frequency is high too. Is the crystal oscillator fed by high frequency voltage or does it generate the high frequency voltage?

2) We all use a 230 V or 110 V AC power supply with a 50 Hz frequency. What are the main steps to obtain clock signals just after power supply?

-

1. I don't know what you mean when you say "Clock rates of computers are too high". Too high for what? They're high, yes, often as high as technology will allow (GHz), often as low as the application allows, for instance a 32kHz watch crystal, if only little processing power is required, or power has to be limited (power consumption is a direct function of clock frequency). Clock frequency is determined by the resonance frequency of a quartz crystal, and you can cut a crystal to about any frequency you want (see edit below). Sometimes processors run of a different type of oscillator, without a crystal, like RC, if the precision a crystal offers isn't required.

2. You don't use the 50Hz frequency to obtain a clock from, though it's not impossible to do so. It's much easier to use a crystal, like I explained above. In many cases, like for PCs, the 50Hz is only used for the power transport (transformers, overhead power lines). Once inside the PC it's converted to several DC voltages, and the 50Hz is no longer relevant. A PC can also run from a battery, and then there is no AC at all.

edit
Like Cybergibbons says there's an upper limit for crystals' frequencies. He mentions 300MHz, Digikey's highest listed crystal frequency is 155MHz. Same Digikey lists crystal ocsillators up to 1.35GHz, but those are overtone oscillators. Other high frequency oscillators may use SAW (Surface Acoustic Wave) technology.
But even a 100MHz crystal can clock a 3.2GHz PC. This uses a PLL, or Phase Locked Loop. It has an internal variable frequency oscillator, and a frequency divider which divded by 32. The frequency this gets us is compared with the 100MHz from the crystal, and the difference (technically the phase difference) is used to adjust the internal oscillator to the required 3.2GHz. Since it has to cintinuously adjust, the 3.2GHz shows slight deviations, known as jitter. So a PLL clock is never as stable as its input signal, but for clocking a PC the deviations are negligible.

another edit

"Is the crystal oscillator fed by high frequency voltage"

When you switch a crystal oscillator on it's just an amplifier, you don't get the desired frequency yet. The only thing that's there is a low-level noise over a wide bandwidth. The oscillator will amplify that noise and pass it through the crystal, upon which it enters the oscillator again which amplifies it again and so on. Shouldn't that get you just very much noise? No, the crystal's properties are such that it will pass only a very small amount of the noise, around its resonance frequency. All the rest will be attenuated. So in the end it's only that resonance frequency which is left, and then we're oscillating.

You can compare it with a trampoline. Imagine a bunch of kids jumping on it randomly. The trampoline doesn't move much and the kids have to make a lot of effort to jump just 20cm up. But after some time they will start to synchronize and the trampoline will follow the jumping. The kids will jump higher and higher with less effort. The trampoline will oscillate at its resonance frequency (about 1Hz) and it will be hard to jump faster or slower. That's the frequencies that will be filtered out.

For most crystal this startup goes fast enough not to be a problem. But 32.768kHz watch crystals can only be driven with very low power, typically 1$\mu$W vs. 500$\mu$W for a 12MHz crystal. As a result a 32kHz crystal oscillator takes much more time to stabilize, often a few seconds.

-
Might be worth adding that the practical limit of crystal oscillators is currently around 300MHz, and anything higher than this is generated by a form of clock multiplication, like a PLL. – Cybergibbons Jun 1 '12 at 18:06
@cybergibbons - Added, thanks. Given the upvotes for your comment it seems highly relevant for others. – stevenvh Jun 2 '12 at 10:58
@stevenvh, it is something that people often do not know, I dont want some poor users looking for a 10GHz crystal. – Kortuk Jun 4 '12 at 12:00
@Kortuk - If they need 10GHz, I would expect they have some years of experience in electronics. If he doesn't know by then, you're giving the assignment to the wrong engineer IMO. – stevenvh Jun 4 '12 at 12:09
@stevenvh, Ha. I was just explaining and using an extreme case, It is a useful. Using a PLL to step a slow oscillator is a pretty easy step. – Kortuk Jun 4 '12 at 12:12
1. Oscillators, as the name suggest, oscillate, thus generating the clock from scratch - which means, you don't need to give them an oscillation, just a supply.
2. They are feeded by a DC voltage, the same that supplies the microcontroller; the AC mains voltage has to be rectified and lowered by the PSU (Power Supply Unit) that you have in the PC or embedded system.
-
thanks, but what component is increasing that high frequencies from 5O Hz.? Is that a high pas filter or something? If it is not oscillator so what is oscillator used for? i mean crystal oscillator or rlc components creating the high frequency? sorry ima bit confused – cmd1024 Apr 14 '12 at 16:48
The oscillator generates a high frequency from a DC (0 Hz) power supply. There is no 50 Hz involved. – The Photon Apr 14 '12 at 16:51
A power supply generates a DC voltage from the 50 Hz mains. There is no "high frequency" involved. – The Photon Apr 14 '12 at 16:51
@cmd1024 - nothing "increases .. from 50 Hz", b/c oscillators start from DC, which is actually 0 Hz. An oscillator makes up a time varying signal right from DC. – JustJeff Apr 14 '12 at 16:52
@cmd1024 In a properly working AC power system, there are no harmonics. – David Kessner Apr 14 '12 at 17:07

Most electronic circuits do not use 50Hz or 60Hz clock to generate clock frequencies. Instead they use crystals to provide a very stable clock. A PLL can then be used to multiply the frequency up to the 2.4GHz etc that the CPUs need. Every microprocessor has a PLL to get the desired frequency

-

This is nice causality question.

For the theorist with 99% knowledge of complete theory of electricity and missing few pieces the method of obtaining a reliable high frequencies source will be a mistery. If such theorist will create a Spice software, the models will be perfectly working except models of oscillators.

1) It is self caused

The crystal oscillators are impossible to run without help of thermal noise. Crystals are just linear filters with very narrow band. Amplified signal in MHz range is not the AC, but thermal noise of all components in oscillator. Which is very broadband noise. The exception is quantum based generators: atomic clocks. (but not quantum amplifiers: lasers). Fortunately AC signal from power generator helps to make start of oscillaton somewhat deterministic. (For simplicity consider that power supply is not a switching kind)

2) Use chaos theory coupling

Second question is how is it possible to exploit the existing source of oscillation when creating your own causality root. Or how is it affecting it, and perhaps how to isolate effects or control degree of effect.

This class of problems boils to coupling of oscillators. If they are build in same universe, then they are coupled. There is no symmetry in coupling. AC of 50-60 Hz is affecting local oscillator more than oscillator affects generator of the power station. The effects backwards involve enormously small numbers, but they exist.

For all practical means power generator is not affected by oscillator. For simplicity: It is only one way. The effect causes phases to be coupled with some strength. The strength is rarely considered advantageous, because designers want their devices to be deterministic. However, no matter how hard one will try to exclude the coupling, it will always exist.

Consequently near 100% of crystal oscillators powered on particular continent are participating in one very broad and loosely coupled causality tree rooted in NIST.

When branches of the tree are tangled, the effect is stronger, especially on close frequencies. If observer will measure phase differences and resulting frequency walk between neighbouring oscillators the 2D picture over long time will show more than one cluster of preferred values with abrupt transition between clusters. This trajectory is nicknamed strange attractor.

Problems of indeterministic behaviour of deterministic systems is studied by chaos theory

-
 Re: -1. I understand that my example of atomic clocks requre some elaboration. It will be my Saturday study, if they are truly immune to the entropy of physical implementation or if they rely on it – Rocket Surgeon Jun 2 '12 at 12:02 I'm -2 :) It's not clear how this relates to the question, but if it did: why would you need chaos theory to trigger an oscillator? You can also build startup circuits, if you don't want to rely on noise (which is always present, being thermal, mains, RF or whatever) – clabacchio♦ Jun 4 '12 at 11:11 Is it really true that "near 100% of crystal oscillators powered on particular continent are participating in one very broad and loosely coupled causality tree rooted in NIST."? How is that measured, and where can I find out more? – Justin Jun 4 '12 at 17:14


text:
# inverse function – InverseFunction: Precision problem

I define a function SS(t) as an inverse function:

``````tt(S_) := 10(2Sqrt((1-S)S) +14/5 ArcTan(Sqrt(S), Sqrt(1-S)) +
2/5 ArcTanh(1/2 Sqrt((1-S)/S)));
SS = InverseFunction(tt);
N(SS(53), 60)
(* 0.200580902656825260833989366151287711207279221292307930697890 *)
``````

SS(t) works great up to t=53: it’s fast, I get a precision of 60, and I can plug it back into the original (forward) function.

PROBLEM:

Starting at t=54, it’s very slow, and the output is way wrong, complex and wrong magnitude. (It should be real and in (0.2, 0.2006)).

STUFF I TRIED:

• The forward function works well for inputs S=0.2+$$epsilon$$ ($$epsilon$$ very small, like $$10^{-10}$$), giving tt($$cdot$$) up to 80, no problem.

• \$MinPrecision=0, \$MaxPrecision=$$infty$$ (defaults).

• Increasing N($$cdot$$,60) to N($$cdot$$,100) makes no difference.

I use Mathematica 8.0.4 on MacOS, installed… 5 years ago?


text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 26 Apr 2019, 00:56

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# A factory cleans its machinery with a solution that is 87% water and

Author Message
TAGS:

### Hide Tags

Senior Manager
Joined: 06 Jul 2016
Posts: 364
Location: Singapore
Concentration: Strategy, Finance
A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

22 Jun 2017, 23:01
6
00:00

Difficulty:

45% (medium)

Question Stats:

72% (02:36) correct 28% (02:59) wrong based on 237 sessions

### HideShow timer Statistics

A factory cleans its machinery with a solution that is 87% water and the remainder vinegar. If the factory manager starts with 260 Litres of a 40% vinegar solution, how much water must the manager add to the existing solution to attain the proper vinegar concentration for cleaning the machinery?

A) 104 Litres
B) 120 Litres
C) 470 Litres
D) 540 Litres
E) 800 Litres

_________________
Put in the work, and that dream score is yours!
Senior Manager
Joined: 28 May 2017
Posts: 283
Concentration: Finance, General Management
Re: A Factory Cleans its machinery with  [#permalink]

### Show Tags

22 Jun 2017, 23:16
2
akshayk wrote:
A factory cleans its machinery with a solution that is 87% water and the remainder vinegar. If the factory manager starts with 260 Litres of a 40% vinegar solution, how much water must the manager add to the existing solution to attain the proper vinegar concentration for cleaning the machinery?

A) 104 Litres
B) 120 Litres
C) 470 Litres
D) 540 Litres
E) 800 Litres

Vinegar content in Ideal Solution should be - 13%
Vinegar content is given solution - 260 x 40%
Total volume of the solution = 260 x 40 x 100/13 = 800
Water that need to be added = 800-260 = 540

_________________
If you like the post, show appreciation by pressing Kudos button
Senior SC Moderator
Joined: 22 May 2016
Posts: 2654
A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

23 Jun 2017, 09:04
akshayk wrote:
A factory cleans its machinery with a solution that is 87% water and the remainder vinegar. If the factory manager starts with 260 Litres of a 40% vinegar solution, how much water must the manager add to the existing solution to attain the proper vinegar concentration for cleaning the machinery?

A) 104 Litres
B) 120 Litres
C) 470 Litres
D) 540 Litres
E) 800 Litres

We have a solution that is 40% vinegar. We need to add water, which is 0% vinegar, to obtain a resultant solution that is 13% vinegar.

Let A = solution with 40% vinegar

Let w = amount of water to be added

A + w = Total volume of resultant mixture

Water is 0% vinegar.

(Concen. of A)(Vol of A) + (Concen. of w)(Vol of w) = (Desired concen. of resultant solution)(Vol of resultant solution)

.40(A) + (0)w = .13(A + w)

.40(240) + 0w = .13(240 + w)

104 + (0)w = (.13)(240) + .13w

104 = 33.8 + .13w

70.2 = .13w

7020 = 13W

w = 540

_________________
Listen, are you breathing just a little, and calling it a life?
-- Mary Oliver

For practice SC questions with official explanations that were posted and moderated by the SC Team,
go to SC Butler here: https://gmatclub.com/forum/project-sc-butler-get-2-sc-questions-everyday-281043.html
VP
Joined: 07 Dec 2014
Posts: 1179
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

23 Jun 2017, 10:57
2
1
akshayk wrote:
A factory cleans its machinery with a solution that is 87% water and the remainder vinegar. If the factory manager starts with 260 Litres of a 40% vinegar solution, how much water must the manager add to the existing solution to attain the proper vinegar concentration for cleaning the machinery?

A) 104 Litres
B) 120 Litres
C) 470 Litres
D) 540 Litres
E) 800 Litres

.6*260+w=.87(260+w)
w=540 liters
D
Manager
Joined: 30 May 2012
Posts: 201
Location: United States (TX)
Concentration: Finance, Marketing
GPA: 3.3
WE: Information Technology (Consulting)
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

12 Jul 2017, 09:27
Can someone help me with this question? I am unable to understand the solutions provided. Thanks
p.s: Is this a mixture problem?
Senior Manager
Joined: 28 Jun 2015
Posts: 290
Concentration: Finance
GPA: 3.5
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

12 Jul 2017, 10:19
1
1
Let $$x$$ be the amount of water to be added to the solution.

The 260 litre solution contains 60% water, so $$\frac{260*60}{100} = 156$$

$$\frac{156+x}{260+x} = \frac{87}{100}$$

$$15600 + 100x = 22620 + 87x$$

$$13x = 7020$$

$$x = 540$$. Ans - D.
_________________
I used to think the brain was the most important organ. Then I thought, look what’s telling me that.
Intern
Joined: 09 Jan 2017
Posts: 1
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

12 Jul 2017, 10:39
From allegation- (40-13):(13-0)=X:260 on solving, X=540

Sent from my XT1562 using GMAT Club Forum mobile app
Target Test Prep Representative
Status: Founder & CEO
Affiliations: Target Test Prep
Joined: 14 Oct 2015
Posts: 5871
Location: United States (CA)
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

16 Jul 2017, 17:23
1
akshayk wrote:
A factory cleans its machinery with a solution that is 87% water and the remainder vinegar. If the factory manager starts with 260 Litres of a 40% vinegar solution, how much water must the manager add to the existing solution to attain the proper vinegar concentration for cleaning the machinery?

A) 104 Litres
B) 120 Litres
C) 470 Litres
D) 540 Litres
E) 800 Litres

We need the vinegar solution to be 13% vinegar.

We have 260 litres that contain 0.4(260) = 104 litres of vinegar.

We can let x = the number of litres of water to be added and create the following equation:

104/(260 + x) = 13/100

10,400 = 13(260 + x)

10,400 = 3,380 + 13x

7,020 = 13x

540 = x

_________________

# Scott Woodbury-Stewart

Founder and CEO

Scott@TargetTestPrep.com
122 Reviews

5-star rated online GMAT quant
self study course

See why Target Test Prep is the top rated GMAT quant course on GMAT Club. Read Our Reviews

Intern
Joined: 28 Dec 2010
Posts: 23
A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

Updated on: 18 Jul 2017, 20:21
Another way to look at the problem:

Initial Solution:

Volume of water = 260 *60/100 = 156 litres ---(1)

Let the volume of water to be added = x litres ---(2)

Final Solution: (Given in the problem)

Volume of water in the final solution = 87% = 87/100

We can represent the percentage of water in the final solutions as:

(156 + x)/(260+x) = 87/100

15600 + 100x = 87*260 +87x
15600 - 22620 = 87x - 100x
- 7020 = -13x
x = 540
Attachments

mixtureproblem.jpg [ 18.32 KiB | Viewed 1432 times ]

Originally posted by gary391 on 18 Jul 2017, 18:00.
Last edited by gary391 on 18 Jul 2017, 20:21, edited 1 time in total.
Intern
Joined: 28 Dec 2010
Posts: 23
A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

18 Jul 2017, 18:06
1
Alligation approach:
Attachments

File comment: Alligation Approach:

mixtureproblemusingaligation.JPG [ 36.01 KiB | Viewed 1448 times ]

VP
Joined: 09 Mar 2016
Posts: 1282
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

19 Jul 2017, 05:03
1
[quote="Blackbox"]Can someone help me with this question? I am unable to understand the solutions provided. Thanks
p.s: Is this a mixture problem?

hi. let me try to explain. to have optimal proportion of mixture with two liquids: water must be 87% of the total solution, while vinegar must be 13% of the total solution. we have total solution which is 260 liters. 40 % of 260 = 104 is vinegar. the rest is water (260-104 = 156) now we are asked how much more water do we need to have 13 % of vinegar and 87 % of water. now we can use simple proportional method 13/87 = 104/x cross multiply and x = 696. since 156 liters of water is already there we need to subtract 696-156 = 540 YAY ! here is answer!!

is it clear ?

have a great day
Intern
Joined: 09 Dec 2013
Posts: 27
Re: A factory cleans its machinery with a solution that is 87% water and  [#permalink]

### Show Tags

21 Jul 2017, 22:34
ScottTargetTestPrep wrote:
akshayk wrote:
A factory cleans its machinery with a solution that is 87% water and the remainder vinegar. If the factory manager starts with 260 Litres of a 40% vinegar solution, how much water must the manager add to the existing solution to attain the proper vinegar concentration for cleaning the machinery?

A) 104 Litres
B) 120 Litres
C) 470 Litres
D) 540 Litres
E) 800 Litres

We need the vinegar solution to be 13% vinegar.

We have 260 litres that contain 0.4(260) = 104 litres of vinegar.

We can let x = the number of litres of water to be added and create the following equation:

104/(260 + x) = 13/100

10,400 = 13(260 + x)

10,400 = 3,380 + 13x

7,020 = 13x

540 = x

Can you please explain how did you form this equation?
104/(260 + x) = 13/100
Thanks
Re: A factory cleans its machinery with a solution that is 87% water and   [#permalink] 21 Jul 2017, 22:34
Display posts from previous: Sort by

# A factory cleans its machinery with a solution that is 87% water and

 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.


text:
# Fast triangulation of unordered point clouds

This tutorial explains how to run a greedy surface triangulation algorithm on aPointCloud with normals, to obtain a triangle mesh based on projections of thelocal neighborhoods. An example of the method’s output can be seen here:

# Background: algorithm and parameters

The method works by maintaining a list of points from which the mesh can begrown (“fringe” points) and extending it until all possible points areconnected. It can deal with unorganized points, coming from one or multiplescans, and having multiple connected parts. It works best if the surface islocally smooth and there are smooth transitions between areas with differentpoint densities.

Triangulation is performed locally, by projecting the local neighborhood of apoint along the point’s normal, and connecting unconnected points. Thus, thefollowing parameters can be set:

• setMaximumNearestNeighbors(unsigned) and setMu(double) control the size ofthe neighborhood. The former defines how many neighbors are searched for,while the latter specifies the maximum acceptable distance for a point to beconsidered, relative to the distance of the nearest point (in order to adjustto changing densities). Typical values are 50-100 and 2.5-3 (or 1.5 forgrids).
• setSearchRadius(double) is practically the maximum edge length for everytriangle. This has to be set by the user such that to allow for the biggesttriangles that should be possible.
• setMinimumAngle(double) and setMaximumAngle(double) are the minimum andmaximum angles in each triangle. While the first is not guaranteed, thesecond is. Typical values are 10 and 120 degrees (in radians).
• setMaximumSurfaceAgle(double) and setNormalConsistency(bool) are meant todeal with the cases where there are sharp edges or corners and where twosides of a surface run very close to each other. To achieve this, points arenot connected to the current point if their normals deviate more than thespecified angle (note that most surface normal estimation methods producesmooth transitions between normal angles even at sharp edges). This angle iscomputed as the angle between the lines defined by the normals (disregardingthe normal’s direction) if the normal-consistency-flag is not set, as not allnormal estimation methods can guarantee consistently oriented normals.Typically, 45 degrees (in radians) and false works on most datasets.

Please see the example below, and you can consult the following paper and itsreferences for more details:

@InProceedings{Marton09ICRA,
author    = {Zoltan Csaba Marton and Radu Bogdan Rusu and Michael Beetz},
title     = {{On Fast Surface Reconstruction Methods for Large and Noisy Datasets}},
booktitle = {Proceedings of the IEEE International Conference on Robotics and Automation (ICRA)},
month     = {May 12-17},
year      = {2009},
}

# The code

First, create a file, let’s say, greedy_projection.cpp in your favoriteeditor, and place the following code inside it:

#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/features/normal_3d.h>
#include <pcl/surface/gp3.h>
#include <pcl/io/vtk_io.h>

int
main (int argc, char** argv)
{
// Load input file into a PointCloud<T> with an appropriate type
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::PCLPointCloud2 cloud_blob;
pcl::fromPCLPointCloud2 (cloud_blob, *cloud);
//* the data should be available in cloud

// Normal estimation*
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);
tree->setInputCloud (cloud);
n.setInputCloud (cloud);
n.setSearchMethod (tree);
n.setKSearch (20);
n.compute (*normals);
//* normals should not contain the point normals + surface curvatures

// Concatenate the XYZ and normal fields*
pcl::PointCloud<pcl::PointNormal>::Ptr cloud_with_normals (new pcl::PointCloud<pcl::PointNormal>);
pcl::concatenateFields (*cloud, *normals, *cloud_with_normals);
//* cloud_with_normals = cloud + normals

// Create search tree*
pcl::search::KdTree<pcl::PointNormal>::Ptr tree2 (new pcl::search::KdTree<pcl::PointNormal>);
tree2->setInputCloud (cloud_with_normals);

// Initialize objects
pcl::GreedyProjectionTriangulation<pcl::PointNormal> gp3;
pcl::PolygonMesh triangles;

// Set the maximum distance between connected points (maximum edge length)

// Set typical values for the parameters
gp3.setMu (2.5);
gp3.setMaximumNearestNeighbors (100);
gp3.setMaximumSurfaceAngle(M_PI/4); // 45 degrees
gp3.setMinimumAngle(M_PI/18); // 10 degrees
gp3.setMaximumAngle(2*M_PI/3); // 120 degrees
gp3.setNormalConsistency(false);

// Get result
gp3.setInputCloud (cloud_with_normals);
gp3.setSearchMethod (tree2);
gp3.reconstruct (triangles);

std::vector<int> parts = gp3.getPartIDs();
std::vector<int> states = gp3.getPointStates();

pcl::io::saveVTKFile("../data/testmesh.vtk", triangles);
// Finish
return (0);
}

The input file you can find at pcl/test/bun0.pcd

# The explanation

Now, let’s break down the code piece by piece.

// Load input file into a PointCloud<T> with an appropriate type
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::PCLPointCloud2 cloud_blob;
pcl::fromPCLPointCloud2 (cloud_blob, *cloud);
//* the data should be available in cloud

as the example PCD has only XYZ coordinates, we load it into aPointCloud<PointXYZ>.

// Normal estimation*
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);
tree->setInputCloud (cloud);
n.setInputCloud (cloud);
n.setSearchMethod (tree);
n.setKSearch (20);
n.compute (*normals);
//* normals should not contain the point normals + surface curvatures

the method requires normals, so they are estimated using the standard methodfrom PCL.

 // Concatenate the XYZ and normal fields*
pcl::PointCloud<pcl::PointNormal>::Ptr cloud_with_normals (new pcl::PointCloud<pcl::PointNormal>);
pcl::concatenateFields (*cloud, *normals, *cloud_with_normals);
//* cloud_with_normals = cloud + normals

Since coordinates and normals need to be in the same PointCloud, we create a PointNormal type point cloud.

  // Create search tree*
pcl::search::KdTree<pcl::PointNormal>::Ptr tree2 (new pcl::search::KdTree<pcl::PointNormal>);
tree2->setInputCloud (cloud_with_normals);

// Initialize objects
pcl::GreedyProjectionTriangulation<pcl::PointNormal> gp3;
pcl::PolygonMesh triangles;

The above lines deal with the initialization of the required objects.

// Set the maximum distance between connected points (maximum edge length)

// Set typical values for the parameters
gp3.setMu (2.5);
gp3.setMaximumNearestNeighbors (100);
gp3.setMaximumSurfaceAngle(M_PI/4); // 45 degrees
gp3.setMinimumAngle(M_PI/18); // 10 degrees
gp3.setMaximumAngle(2*M_PI/3); // 120 degrees
gp3.setNormalConsistency(false);

The above lines set the parameters, as explained above.

 // Get result
gp3.setInputCloud (cloud_with_normals);
gp3.setSearchMethod (tree2);
gp3.reconstruct (triangles);

The lines above set the input objects and perform the actual triangulation.

// Additional vertex information
std::vector<int> parts = gp3.getPartIDs();
std::vector<int> states = gp3.getPointStates();

for each point, the ID of the containing connected component and its “state”(i.e. gp3.FREE, gp3.BOUNDARY or gp3.COMPLETED) can be retrieved.

# Saving and viewing the result

You can view the smoothed cloud for example by saving into a VTK file by:

#include <pcl/io/vtk_io.h>
...
saveVTKFile ("mesh.vtk", triangles);

# Compiling and running the program

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

project(greedy_projection)

find_package(PCL 1.2 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS}) add_executable (greedy_projection greedy_projection.cpp) target_link_libraries (greedy_projection${PCL_LIBRARIES})

After you have made the executable, you can run it. Simply do:

\$ ./greedy_projection

09-06 421

09-09 101

#### segmentation using delaunay Triangulation

2017年06月02日 00:00

07-18 4363

11-06 1127

12-05 3960

01-15 306

10-15 688

10-13 458


text:
Volume 33, Issue 3
On ∂-Reducible 3-Manifolds Which Admit Complete Surface Systems

Commun. Math. Res., 33 (2017), pp. 215-222.

Published online: 2019-11

Cited by

Export citation
• Abstract

In the present paper, we consider a class of compact orientable 3-manifolds with one boundary component, and suppose that the manifolds are ∂-reducible and admit complete surface systems. One of our main results says that for a compact orientable, irreducible and ∂-reducible 3-manifold M with one boundary component F of genus $n > 0$ which admits a complete surface system S′ , if D is a collection of pairwise disjoint compression disks for ∂M, then there exists a complete surface system S for M, which is equivalent to S′ , such that D is disjoint from S. We also obtain some properties of such 3-manifolds which can be embedded in S3.

• Keywords

complete surface system, ∂-reducibility, Heegaard splitting

57M25, 55Q20

zhaoyan jinzh@126.com (Yan Zhao)

• BibTex
• RIS
• TXT
@Article{CMR-33-215, author = {Yan and Zhao and zhaoyan jinzh@126.com and 5414 and School of Mathematical Sciences, Dalian University of Technology, Dalian, 116024 and Yan Zhao and Fengchun and Lei and and 5415 and School of Mathematical Sciences, Dalian University of Technology, Dalian, 116024 and Fengchun Lei and Fengling and Li and and 5416 and School of Mathematical Sciences, Dalian University of Technology, Dalian, 116024 and Fengling Li}, title = {On ∂-Reducible 3-Manifolds Which Admit Complete Surface Systems}, journal = {Communications in Mathematical Research }, year = {2019}, volume = {33}, number = {3}, pages = {215--222}, abstract = {

In the present paper, we consider a class of compact orientable 3-manifolds with one boundary component, and suppose that the manifolds are ∂-reducible and admit complete surface systems. One of our main results says that for a compact orientable, irreducible and ∂-reducible 3-manifold M with one boundary component F of genus $n > 0$ which admits a complete surface system S′ , if D is a collection of pairwise disjoint compression disks for ∂M, then there exists a complete surface system S for M, which is equivalent to S′ , such that D is disjoint from S. We also obtain some properties of such 3-manifolds which can be embedded in S3.

}, issn = {2707-8523}, doi = {https://doi.org/10.13447/j.1674-5647.2017.03.03}, url = {http://global-sci.org/intro/article_detail/cmr/13377.html} }
TY - JOUR T1 - On ∂-Reducible 3-Manifolds Which Admit Complete Surface Systems AU - Zhao , Yan AU - Lei , Fengchun AU - Li , Fengling JO - Communications in Mathematical Research VL - 3 SP - 215 EP - 222 PY - 2019 DA - 2019/11 SN - 33 DO - http://doi.org/10.13447/j.1674-5647.2017.03.03 UR - https://global-sci.org/intro/article_detail/cmr/13377.html KW - complete surface system, ∂-reducibility, Heegaard splitting AB -

In the present paper, we consider a class of compact orientable 3-manifolds with one boundary component, and suppose that the manifolds are ∂-reducible and admit complete surface systems. One of our main results says that for a compact orientable, irreducible and ∂-reducible 3-manifold M with one boundary component F of genus $n > 0$ which admits a complete surface system S′ , if D is a collection of pairwise disjoint compression disks for ∂M, then there exists a complete surface system S for M, which is equivalent to S′ , such that D is disjoint from S. We also obtain some properties of such 3-manifolds which can be embedded in S3.

Yan Zhao, Feng-chun Lei & Fengling Li. (2019). On ∂-Reducible 3-Manifolds Which Admit Complete Surface Systems. Communications in Mathematical Research . 33 (3). 215-222. doi:10.13447/j.1674-5647.2017.03.03
Copy to clipboard
The citation has been copied to your clipboard


text:
4 edited tags
3 edited body

Hi, I would like to know whether there is some more effective way of how to compute an intersection of a vector subspace of $\mathbb{R}^{n}$ with a cone of vectors with non-negative entries then than the following one:

Let $W$ be a subspace of $\mathbb{R}^{n}$ and $(e_1,\dots,e_n)$ be the standard basis of $\mathbb{R}^{n}$. Find all $F\subseteq{1,\dots,n}$ such that $W_{F}:=W\cap \left\langle e_{i}|i\in F\right\rangle$ is 1-dimensional and intersects non-trivially the cone of vectors with non-negative entries (let $u_{F}$ be such non-trivial vector). Then our desired set is generated (as a cone) by all such $u_{F}$ 's for appropriate $F$ 's.

Thanks.

2 edited title; edited title

1


text:
# Math Help - Help With Trig Limit

1. ## Help With Trig Limit

How do you solve the limit: lim x --> 0 sin (9x)/ sin(5x)

I really don't have much of a clue where to start, so if someone could explain every step of how to solve this, I'd be real grateful.

How do you solve the limit: sin (9x)/ sin(5x)

I really don't have much of a clue where to start, so if someone could explain every step of how to solve this, I'd be real grateful.
Where is x going towards in this problem?

3. as $x\to0,$ otherwise what'd be the sense on taking other value.

How do you solve the limit: lim x --> 0 sin (9x)/ sin(5x)

I really don't have much of a clue where to start, so if someone could explain every step of how to solve this, I'd be real grateful.
Hint

$\mathop {\lim }\limits_{x \to 0} \frac{{\sin 9x}}
{{\sin 5x}} = \frac{9}
{5} \cdot \mathop {\lim }\limits_{x \to 0} \frac{{\sin 9x}}
{{9x}} \cdot {\left( {\mathop {\lim }\limits_{x \to 0} \frac{{\sin 5x}}
{{5x}}} \right)^{ - 1}} = \ldots$

5. What I'm kind of confused on is how u factored out the 5/9 form the sin (x) equations. Could you please explain that?

Oh wait! Is the sin 9x/ 9x thing taken from the sin (x)/ x is equal to 1? But then don't you have to multiply the top and bottom both by 9x in order for it to remain equivalent? Same with the 5x?

What I'm kind of confused on is how u factored out the 5/9 form the sin (x) equations. Could you please explain that?

Oh wait! Is the sin 9x/ 9x thing taken from the sin (x)/ x is equal to 1? But then don't you have to multiply the top and bottom both by 9x in order for it to remain equivalent? Same with the 5x?
$\mathop {\lim }\limits_{x \to 0} \frac{{\sin 9x}}
{{\sin 5x}} = \frac{9}
{5} \cdot \mathop {\lim }\limits_{x \to 0} \left[ {\frac{{\sin 9x}}
{{9x}} \cdot \frac{{5x}}
{{\sin 5x}}} \right] =$

$= \frac{9}
{5} \cdot \mathop {\lim }\limits_{x \to 0} \frac{{\sin 9x}}
{{9x}} \cdot \mathop {\lim }\limits_{x \to 0} \frac{{5x}}
{{\sin 5x}} =$

$= \frac{9}
{5} \cdot \mathop {\lim }\limits_{x \to 0} \frac{{\sin 9x}}
{{9x}} \cdot {\left( {\mathop {\lim }\limits_{x \to 0} \frac{{\sin 5x}}
{{5x}}} \right)^{ - 1}} = \ldots$

Now use this

${\color{red}\boxed{{\color{black}\mathop {\lim }\limits_{x \to 0} \frac{{\sin ax}}{{ax}} = 1}}}$


text:
All Questions

90 views

Show scatter plot of change in image saturation

Let's say I have two images. One is the original and the other is after some photo-manipulation has been applied to it. I want to show the effect on the color saturation using a scatter chart. ...
79 views

Rotating a 3D plot constantly resizes

When I click and drag a 3D plot it rotates and when I release the mouse, the size of the image changes. This is distracting to me, I'd much rather have it look the same when I release the mouse button ...
74 views

Substituting inside a differential equation

x y''[x]+2y'[x]+l^2 x y[x]==0/.y[x]->Cos[x] I think above code shows what I want to do quite clearly. How do I make it happen. Only y[x] is replaced.
56 views

What is this Counts[] output format?

I need to create a list of the distinct elements in a list along with the number of times each appears. The function Counts[] is supposed to do this, but it puts the results in some weird format I've ...
167 views

Which platform is ideal for performance?

I have been using NDSolve, and I noticed that when you decrease the MaxStepSize, possible singularities are resolved. If I ...
46 views

Indeterminant expression encountered in Summation

I have a function that I'm trying to find an explicit form for the coefficients in its power series expansion. On paper, it is a long calculation so I decided to write up the formula in mathematica. ...
78 views

Working with a two-variable function with one input fixed

Here's what I know how to do: f[x_] := x^2 - 4 x + 4 Ordering[f /@ {1, 2, 3}] This will evaluate f at each point and rank their sizes. Here's what I really have:...
91 views

How to trigger Emacs to open a file from Mathematica? [duplicate]

I thought Run will do the trick: Run["emacs -q " <> myfile] Run["! emacs -q " <> myfile] But it does not! I'm ...
199 views

Why doesn't ParallelTable work on this very simple example?

For some reason, I'd like to use ParallelTable with a variable number of iterators. Table[a[1], {a[1], 0, 10}] works fine: ...
270 views

How to replace element of list by index

I'd simply like to replace the value x at index [[j,i]] in a two dimensional table with the value ...
356 views

This function finds n given the nth prime: findPrime[n_] := If[PrimeQ[n], i = 1; While[Prime[i] < n, i = i + 1]; i, False]; This works: ...


text:
# What biomaterials with higher compressive strength than bone can I use to make big but proportionate humanoids?

One of the many problems with making really, really big creatures is that their bones are, eventually, incapable of supporting their own weight. Eventually, they get to be all leg and no body. This is especially a problem when trying to make something that's humanoid but larger than normal, because you have to make the legs elephantine in order for them to support the weight of everything else. The square-cube law is generally a pain in the rear when doing such things.

Now, the obvious solution to this is to make better bones/supportive structures - ones that can withstand more compressive force per unit of bone mass, meaning that you can use less of them, meaning that you don't need to make disproportionately-wide limbs to counteract a creature's mass.

I considered using the goethite nanofiber/protein mixture that limpet teeth use, which has a tensile strength of 3-6.5 gigapascals, but I don't think that that tensile strength translates into the compressive strength required to make an effective bone, since tensile strength is a measure of how durable a substance is when being pulled on, whereas compressive strength is a measure of how durable a substance is when being squeezed.

So: what are some biological substances stronger than bone?

Quality answers to this question will cite a substance that falls into the following four categories:

• Either capable of being processed by Earthly biology, or capable of being built out of metabolizable sub-components of itself by Earthly biology. No noble gases or non-reactive substances, here, please, although I wonder how they'd ever be a suitable answer to this. Note that those limpet teeth I previously mentioned are made of such a metabolizable substance, in that the limpet turns iron into ferrihydrite, which is then nucleated and turned into goethite crystals (i.e. those nanofibers I mentioned earlier).

• Stronger than bone in terms of compressive strength. Bone has a compressive strength of 170 megapascals. I want more. I can worry about shear loads later, or counteract them by wrapping the compressive core of the bone (i.e. what carries the weight) in biologically-grown limpet-tooth spaced armor with bone marrow in-between as a shock absorber.

• Not water or muscle. I do not want hydrostatic skeletons or muscular hydrostats.

• Has to be possible on Earth. No frozen hydrocarbons. Especially no neutronium. No, not even a little. Bad Stack Exchange. Bad. Drop. Drop the neutronium. Good boy.

Note that I am not interested in determining what evolutionary pressures might lead to the adoption of such a material as a supportive structure; we're talking mad science and the limits of what's possible here, not boring old evolution. I am also not interested in how this might affect the biology of the creature it's attached to - i.e. things like blood flow issues or increased nutritional needs. All I am interested in is whether there are biomaterials with better compressive strength than bone.

Tagged "science-based" because I want this to be an actual material, and not handwavium, but not "hard-science", because whatever this is has probably never actually been used in a supportive structure in real life.

• Not really a biomaterial-related thing so it's a comment, but you might want to look into tensigrity structures. They won't get around the SCL, but you can get some pretty big self-supporting structures(perhaps bodies?) by dedicating less physical space in the construction of dedicated supports. Dec 7, 2021 at 9:43
• Not toxic, poisonous, cancer-inducing, or otherwise harmful to Earthly biology. No heavy metals. No toxins.  - why? if your big humans evolve with this, they're obviously immune. if they're manufactured, then technology is advanced enough to protect against those materials. so i think that's kind of a non-issue. also: how big do you want to get? and what are your thoughts on blood pressure - multiple hearts? actively pumping veins? Dec 7, 2021 at 9:55
• @FranzGleichmann I'm not concerned about blood flow issues. Come to think of it, though, that does seem arbitrary. I'll get rid of it. Dec 7, 2021 at 9:57
• How big do you want them? There are lots of examples taller than 250cm, and they did just fine, leg-bone-wise. -- Also: why is bloodflow unimportant? the sole area is incredíbly compressed, as are any compressively forced joints, and those all need their circulation Dec 7, 2021 at 13:27
• What about a pneumatic energy delivery system such as is found in sauropods, that decreases the structural requirements of the bone material by decreasing the mass of the creature while still allowing it to scale? This is one way of obviating some of the supermaterial requirements. Dec 7, 2021 at 23:07

Silica - networks of silicon and oxygen with the general formula SiO2.

Diatoms make their shells out of it. Plants incorporate it into their cell walls. Sponges make their spicule skeletons out of it.

You just need to scale it up. Rather than building microscopic shells or a composite matrix of tiny spicules and collagen / cellulose, just keep depositing larger and larger layers of straight silica.

The easiest form to deposit bulk silica in would probably be opal (hydrated amorphous silica), which would look awesome, but isn't super strong--worse than regular bone. But if you can get the organism to exclude water and just produce macroscopic solid chunks of pure silica, you're looking at a compressive strength of around 1100 MPa.

And if you wanna go a little further out there... Sapphire

Sapphire is aluminum oxide, Al2O3. It has a compressive strength of 2 gigapascals, so even if you accept some losses in incorporating it into a biological composite, you're still starting out way ahead of natural bone. Aluminum is not currently know to play any significant role in biology, but it is bioavailable in ion form (e.g., as aluminum citrate) and accumulates in the biosphere, so it should be available in normal food supplies--and if biology can handle laying down oxidized iron crystals, I'm sure something can be worked out for depositing oxidized aluminum!

• This sounds a bit like you want bones made of glass or concrete. How are they going to handle the stresses real bones do? Some citations would be good. Dec 14, 2021 at 17:08
• @DWKraus Not my problem. The question is specifically and narrowly about compressive strength. Dec 14, 2021 at 17:22

# Abalone-chitin composites (and dinosaur engineering):

Without making the individual materials, it's hard to promise that the resulting substances will be super-materials. But research into artificial bone graft materials suggests a likely composite. Hydroxyapatite tends to be brittle, so more flexible materials are being researched. Another excellent article on biomaterial ceramics like bone and nacre can be found HERE.

• NACRE, also known as mother-of pearl, has great composite strength. Artificial nacre is being developed as a material due to these properties. It has an extremely high Young's modulus, which is a general evaluation of strength, and has a compressive strength of 300-500 MPa. It is composed of small plates, bricks, hexagons or disks of aragonite that are then separated by elastic biopolymers. In a study of nacre versus whale bone, nacre outperformed bone in studies of toughness, with bone being weaker and more brittle.
• Your material will need a viscoelastic layer between the plates (platelets) of aragonite, composed of a polysaccharide-type material. I would suggest a silk or chitin material, since it already has a long history of being used for this function, and chitin can surround and fill in where the nacre stacks don't.

Unlike more exotic materials like graphene, these are biologically produced with current biology and don't require your organisms to reinvent the wheel (biologically speaking).

• Design from Dinos: I suspect (but I'm not a bio-engineer) that the square-cube law will hit your giants in the joints before this material would fail. Pressure on joints is already a constraint on humans, and a regenerative and arthritis-resistant joint design will be important to your answer's long-term success. You may also want to look to dinosaur bone structure to understand how the construction of bone in dinosaurs may have contributed to their ability to support greater weight.

A quick Wikipedia search returns a list of biomaterials with related compressive strength.

Cortical bone has a reported compressive strength of 100-230 MPa, while Hydroxyapatites is listed at 500-1000 Mpa.

Hydroxyapatite, also called hydroxylapatite (HA), is a naturally occurring mineral form of calcium apatite [...] Up to 50% by volume and 70% by weight of human bone is a modified form of hydroxyapatite, known as bone mineral. Carbonated calcium-deficient hydroxyapatite is the main mineral of which dental enamel and dentin are composed. [...] Hydroxyapatite is present in bone and teeth; bone is made primarily of HA crystals interspersed in a collagen matrix—65 to 70% of the mass of bone is HA. Similarly HA is 70 to 80% of the mass of dentin and enamel in teeth. In enamel, the matrix for HA is formed by amelogenins and enamelins instead of collagen.

Wrapping up, it looks like nature has done already a good job at tuning the bone overall performance.

• And I'd wager that if you increade the HA-part of the bone you loose out on a lot of other necessary traits like flexibility and so on Dec 8, 2021 at 10:54
• Yep. Bones are reasonably bendy and need to absorb shock as well as stress. If you break a bone it can fix itself but if you shatter a tooth it's gone forever. Having bones made of tooth enamel would be a crippling disability.
– J...
Dec 8, 2021 at 15:04

Stone.

https://commons.wikimedia.org/wiki/File:Acropolis_-_column_of_the_Propylaea.jpg

A higher compressive strength indicates that the stone can withstand a higher crushing load. The required values range from 1,800 psi (12.45 MPa) for marble to 19,000 psi (131 MPa) for granite.

Your animals would of course not make stones, but would find suitable stones and put them in their bodies. Other animals use environmental objects chosen for hardness - hermit crabs come to mind, using found shells (or anything else of suitable size and shape) as carapaces.

Your creatures will find stones and incorporate them as weight bearing elements. I envision them stacked like the above column, much as our own vertebral column is stacked. Stones will be held in place by tendons and ligaments just as our bones are. They could be endoskeletons or exoskeletons.

The stone - stone interface will naturally wear into shape as the animal moves, forming interfaces the one to the next. A consequence of this is that previously used stones from dead giants will already have wear on them and so would work better as skeletal elements than fresh stones with only abiogenic wear.

I like the idea of technologically sophisticated aliens bringing presents to these giants: ceramic coated metal skeletal elements. Now the giants can get really big!

• Normal ordinary bone is essentially bio-stone. Dec 7, 2021 at 15:34
• @ZeissIkon Agreed. But biostone is not as strong as granite. Dec 7, 2021 at 15:48
• So basically what you need for this answer to work is... an amorphous and hyper adaptive flesh/organ mass that tends to be rather small and unspecialised in form but can take in solid objects for use as structural support and basically construct its own skeleton? Dec 7, 2021 at 18:38
• The highest compressive strength I've found for granite is 200 MPa; most references place it around 130-150 MPa. That's slightly weaker than bone: the human femur, for example, has a lengthwise compressive strength of around 205 MPa.
– Mark
Dec 8, 2021 at 0:36
• @Mark you know it pains me when people accurately comment about how I was not right, and I feel that pain now. So thanks to you these giants cannot use just any rock. It must be quartz crystals with a compressive strength of 2.2 - 2.7 Gpa.. Quartz is not super rare. Crystal skeletons are more fantastic anyway. Jade might be better if they can get it. Dec 8, 2021 at 1:15


text:
# What's the Kendall Tau's distance between these 2 rankings?

ranking i: {3, 1, 2}

ranking j: {2, 1, 3}

I am referring to the Wikipedia page here, and to calculate the Kendall distance, I just need to count the number of times the values in ranking i are in the opposite order of the values in ranking j.

3 < 1 in ranking i, but 3 > 1 in ranking j

3 < 2 in ranking i, but 3 > 2 in ranking j

1 < 2 in ranking i, but 1 > 2 in ranking j

There are 3 switches, so the Kendall distance is 3. However when I call a function to calculate the Kendall's distance in R, it returns 1. What's the correct Kendall's distance between these 2 rankings?

• The wiki says the distance is the total number of discordant pairs of observations (that is, it is Q in the formula of Gamma or Kendall's tau). Consider the pairs of observations (columns): i(3>1) and j(2>1) = concordant; i(1<2) and j(1<3) = concordant; i(3>2) but j(2<3) = discordant. One discordant pair. Aug 24 '15 at 20:47
• If it's [3,1,2] vs [2,1,3] the number of discordant pairs here is 3 out of 3. If you use Python's scipy Kendall’s tau function to calculate the correlation coefficient you'll get -1. The coefficient is defined as the ratio of concordant pairs minus the discordant pairs, in this case it's 0/3 - 3/3 Unless you're looking at it as indices and values, (let's say indices are letters) than: ranking i: a-3, b-1, c-2 = b-1, c-2, a-3 ranking j: a-2, b-1, c-3 = b-1, a-2, c-3 In that case the distance is 1. So perhaps the function in R looks at it this way
– Oleg
Apr 8 '20 at 3:55

The Kendall tau distance in your case is, indeed, 1.

See the following python code:

import itertools

def kendallTau(A, B):
pairs = itertools.combinations(range(0, len(A)), 2)

distance = 0

for x, y in pairs:
a = A[x] - A[y]
b = B[x] - B[y]

# if discordant (different signs)
if (a * b < 0):
distance += 1

return distance

ranking_i = [3, 1, 2]
ranking_j = [2, 1, 3]
assert kendallTau(ranking_i, ranking_j) == 1

• that wrong, the distance is 3. See other answers Mar 31 '20 at 9:20
• The function works ok, there's just confusion between orderings and ranks. The ordered list of objects 3 > 1 > 2 posed in the original question translates to assigned ranks of [2, 3, 1] (i.e. object 3 is ranked first, object 1 second, and object 2 third). Likewise, the list 2 > 1 > 3 takes assigned ranks of [2, 1, 3]. This answer assumes the ordered lists ('rankings') provided are themselves ranks assigned to objects (e.g. assuming in 'ranking i' that object 1 is ranked third, object 2 first, etc). Setting ranking_i = [2, 3, 1] and ranking_j = [2, 1, 3] yields the correct distance (3). Sep 10 '20 at 9:53

The wrong answer got accepted! The correct answer is 3.

From Wikipedia: Kendall tau distance is also called bubble-sort distance since it is equivalent to the number of swaps that the bubble sort algorithm would take to place one list in the same order as the other list.

import itertools

def kendall_tau_distance(order_a, order_b):
pairs = itertools.combinations(range(1, len(order_a)+1), 2)
distance = 0
for x, y in pairs:
a = order_a.index(x) - order_a.index(y)
b = order_b.index(x) - order_b.index(y)
if a * b < 0:
distance += 1
return distance

print kendall_tau_distance([3,1,2], [2,1,3])
3

• I think you need to look again at the comment under the original question for the definition of Kendall distance. Jan 25 '18 at 14:37
• I think that the definition of Kendall tau distance in the comment under the original question is wrong. its not whats is in en.wikipedia.org/wiki/Kendall_tau_distance The Kendall tau rank distance between two rank orders is the total number of rank disagreements over all unordered pairs. Jan 25 '18 at 16:20
• @Cohensius It clearly says in the mathematical definition of $K(\tau_1 \tau_2)$ that you have to index the lists, also, in OP's question, you only need one single swap to make one list the same as the other (you swap indexes 1 and 3).
– Ash
May 4 '18 at 19:47
• ...counts the number of pairwise disagreements between two ranking lists: in the OP example: in ranking i: 3<1 while in ranking j: 1<3 in ranking i: 1<2 while in ranking j: 2<1 in ranking i: 3<2 while in ranking j: 2<3 Thats 3 pairwise disagreements May 6 '18 at 16:24
• @Ash the swaps need to be between adjacent items, so 3 is correct Jul 17 '19 at 14:31

The Kendall tau distance in this instance is 3. It is also known as Kemeny distance. See here and here.

In some fields rankings are also allowed to have ties, therefore the Kemeny could be considered as a distance of 6 instead of 3. That's a confusion that arises quite often. But in your situation it is 3 because ties are not allowed.

Kendell tau distance is the number of swaps which needs to be done for making the two lists the same. It can also be considered as a variant of Insertion Sort, where each swap adds +1 to Kendell distance.

• You don't answer the OP question. What's the correct Kendall's distance between these 2 rankings? Mar 31 '20 at 9:22