text:
# Output the sign

Given a number N, output the sign of N:

• If N is positive, output 1
• If N is negative, output -1
• If N is 0, output 0

N will be an integer within the representable range of integers in your chosen language.

## The Catalogue

The Stack Snippet at the bottom of this post generates the catalogue from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:

## [><>](https://esolangs.org/wiki/Fish), 121 bytes

/* Configuration */

var QUESTION_ID = 103822; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 8478; // This should be the user ID of the challenge author.

/* App */

return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
data.items.forEach(function(a) {
var id = +a.share_link.match(/\d+/);
});
if (!data.has_more) more_answers = false;
comment_page = 1;
}
});
}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
data.items.forEach(function(c) {
if (c.owner.user_id === OVERRIDE_USER)
});
else process();
}
});
}

var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
return a.owner.display_name;
}

function process() {
var valid = [];

var body = a.body;
if(OVERRIDE_REG.test(c.body))
body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
});

var match = body.match(SCORE_REG);
if (match)
valid.push({
user: getAuthorName(a),
size: +match[2],
language: match[1],
});
else console.log(body);
});

valid.sort(function (a, b) {
var aB = a.size,
bB = b.size;
return aB - bB
});

var languages = {};
var place = 1;
var lastSize = null;
var lastPlace = 1;
valid.forEach(function (a) {
if (a.size != lastSize)
lastPlace = place;
lastSize = a.size;
++place;

.replace("{{NAME}}", a.user)
.replace("{{LANGUAGE}}", a.language)
.replace("{{SIZE}}", a.size)

var lang = a.language;
lang = jQuery(''+lang+'').text();

languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link};
});

var langs = [];
for (var lang in languages)
if (languages.hasOwnProperty(lang))
langs.push(languages[lang]);

langs.sort(function (a, b) {
if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) return -1;
return 0;
});

for (var i = 0; i < langs.length; ++i)
{
var language = jQuery("#language-template").html();
var lang = langs[i];
language = language.replace("{{LANGUAGE}}", lang.lang)
.replace("{{NAME}}", lang.user)
.replace("{{SIZE}}", lang.size)
language = jQuery(language);
jQuery("#languages").append(language);
}

}
body {
text-align: left !important;
display: block !important;
}

width: 290px;
float: left;
}

#language-list {
width: 500px;
float: left;
}

font-weight: bold;
}

table td {
}

<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/all.css?v=ffb5d0584c5f">

Shortest Solution by Language

Language	User	Score

	Author	Language	Size

• This is a trivial challenge with a lot of trivial solutions. There are however some non-trivial solutions too. To voters: Please read the first sentence of this meta post before upvoting builtin functions. Dec 20 '16 at 10:10
• This could probably use a leaderboard. Dec 20 '16 at 11:13
• With a challenge such as this, I'd only be impressed if there was an answer that used less than 1 byte. Say, 5 bits or something. That I would upvote. Dec 22 '16 at 13:13
• @FlipTack Oh, I thought it was codegolf. Dec 28 '16 at 20:23
• @MrLister that's the objective winning criterion. but does it really take more effort to type s for a sign builtin, or use some clever bitshifting/maths to work it out? Have a look at this meta post Dec 28 '16 at 20:25

## QBIC, 18 8 bytes

:?sgn(a)

This utilizes Qbasic's SGN() function. : gets the input in variable a, ? prints.

Original version, before I learnt that QBasic has a SGN() function:

:~a=b|?a\?a/abs(a)

18 bytes. Explanation

:           Get 'a' from the command line
~a=b        If a == b (and b==0 by default)
|?a         Then print a
\?a/abs(a)  Else, print a / abs(a) --> -2/2 leaves the req. -1, 4/4 = 1

## Javascript, 37 bytes

function s(n){return n>0?1:n<0?-1:0}

• Sorry, updated! Dec 21 '16 at 15:35
• You could use a lambda: n=>n>0?1:n<0?-1:0
– user45941
Dec 23 '16 at 14:45

## brainfuck, 23 bytes

-<,
[
[
>-[-<]
>
]
->[>+>]
]
<.

This takes a single byte from stdin and interprets it as a signed char, printing \xff for negative, \x00 for zero, and \x01 for positive.

Try it online.

Viewed as an unsigned char, we are checking whether it is greater than 127, with 0 as a special case. We can do the comparison by decrementing from 255 twice at a time.

• Doing I/O as decimal strings could be fun too. Dec 21 '16 at 16:48
• You could argue that all numbers in BF are positive, so ,>+. is a valid answer. Dec 22 '16 at 4:38
• @Challenger5 Even if that were modified to handle zero, e.g. with ,[>+>]<., I don't think that could be argued as anything other than a loophole. Dec 22 '16 at 5:49
• Definitely, but it's funny. Dec 22 '16 at 5:50
• @Challenger5 That would be abusing native number types to trivialize the challenge. The solution Mitch has used (interpreting the input as an 8-bit two's complement integer) is valid, and the only valid way to do this in brainfuck other than interpreting decimal strings (unless there's another way and I'm not seeing it).
– user45941
Dec 23 '16 at 14:44

# MarioLANG, 868 bytes

;
=
[@:
=======================================================
))    <
======================================================"
@ ((((++
=======            <
==========="
@ -)+)+)+((([!))+((
=============#====    (<
===="
@ +)-[!)))
======#==      )  <
========"
>([!)
"==#        ))  <
@ -(-)[!+   ==========="
=======#:          >(([!!
"===##
@ +((-))[!-
=========#:

## Ungolfed, with comments

;[>
==                                                                                output zero
[@                                                                                :                                                                      * start
move pointer back to arg  ))    <
=================================================================================="===
increase counter limit
@   ((((++
=================    set counters
<
============"     increase counter_add by one
@ -)+)+)+ ((([! ))+((
==============#======
reset limit
(<
======="
@ +)-   [! )))
=========#====   try subtraction
)  <
==========="
> ( [! )
"====#==
@ -(-) [!               try addition
========#                   ))  <
==============="
> (( [!  !
"=====#==#
@  +((-)) [!
===========#

output one       output minus one
+:                -:
===               ===

### What's going on?

The program maintains 5 memory fields (right to left):

• Input value, continuously edited in search of zero
• Counter for search in negative direction (subtraction)
• Counter for search in positive direction (addition)
• Helper to reset search radius (limit)
• Current search interval radius (limit, k)

The algorithm keeps on searching for zero in both (+ and -) directions, starting at the input value. It does k negative and k+1 positive steps on each iteration, then increases k by 2. Once zero has been found, 1 or -1 is output, depending from which side it was reached.

Detection of zero as input is a special case, handled right at the beginning.

Try it online (commented, ungolfed version)

# Python 3, 13 bytes

n//abs(n-.1)

• Welcome to the site, and nice first answer! Just so you know, this is only a REPL snippet, which aren't a default valid form of output. You could wrap this in a lambda to make a function submission though. lambda n:n//abs(n-.1) Dec 24 '16 at 7:27

# C, 23 bytes

A more portable (I think) 23-byte solution in C:

f(n){return(n|1)%2-!n;}

# C#, 40 bytes

b=>System.Console.Write(b>0?1:b<0?-1:0);

Or with a built-in:

# C#, 44 bytes

using System;b=>Console.Write(Math.Sign(b));

Unfortunately it's longer, then the first solution.

# MATLAB + Octave, 15bytes

There are a few other Octave/MATLAB answers, but two of the others are simply using a built in, and the other is significantly longer.

The anonymous function:

@(a)(a>0)-(a<0)

Quite simple. If a>0, the answer will be (1-0)=1. If a<0, the answer will be (0-1)=-1. If a==0 the answer will be (0-0)=0.

You can try online here. Simply run the above code and then try with ans(input).

# Java 8, 33, 17, 14 bytes

i->i>0?1:i>>31

Does not rely on any questionable code constructs or fragments. This is a complete functional interface implementation.

• You can reduce to (int i)->i<0?-1:i>0?1:0 (or even further to i->i<0?-1:i>0?1:0) which are all accepted solutions here on codegolf (codegolf.stackexchange.com/a/16100/16236). Dec 24 '16 at 0:23
• @OlivierGrégoire thanks, for some reason I was not thinking "this is a single expression, so the lambda can be reduced."
– user18932
Dec 24 '16 at 19:12
• It can be reduced to this: i->i>0?1:i>>31 (14 bytes) Jan 10 '17 at 10:49

# Scala, 16 bytes

n=>n compareTo 0

# Common Lisp, 21 6 bytes

signum

Try it online!

# dc, 22 bytes

[pq]sqd0=qdd*vr1-d*v-p

Try it online!

I don't like that 10 bytes of this is eaten up testing for zero, will continue to mull over that. The second half, dd*vr1-d*v-p uses the square root of the square to calculate the absolute value of both our value to test and that value less one. Subtracting the latter from the former yields 1 for a positive value, -1 for a negative.

# Aceto, 4 bytes

riyp

ri reads input as integer
y puts sign on stack
p prints it

Try it online!

# dc, 15 bytes

[_1*]sa?dd0>a/p

Try it online!

### Explanation

This (ab)uses the fact that dc keeps the stack as is, if you're trying to divide by 0 which really helps for this challenge:

[_1*]sa          # store the macro in register a (macro negates the top)
?         # push input to stack
d        # duplicate top
d0>a    # if top is negative, execute macro
/   # divides top two values
p  # print the top of the stack

# Functoid, 30 28 bytes

In functoid there is no support for negative integers since numbers are handled as Church numerals. This solution redefines numbers in a way that supports negative numbers (please refer to the explanation):

<|12K0K$BbB r<@.1,"-" )<@.([  Try it online! (Here is an input generator) ### Explanation The definition of negative numbers extends the Church numerals by simply introducing another lambda abstraction that encodes the sign of a number (the first argument, ie. x3). Here is how the numbers -2,-1,0,1,2 would look like in this notation: Decimal number | extended Church numerals | absolute value as Church numeral ---------------+--------------------------+--------------------------------- -2 | λλλ(x3 (x2 (x2 x1))) | λλ(x2 (x2 x1)) -1 | λλλ(x3 (x2 x1)) | λλ(x2 x1) 0 | λλλ(x1) | λλ(x1) 1 | λλλ(x2 x1) | λλ(x2 x1) 2 | λλλ(x2 (x2 x1)) | λλ(x2 (x2 x1))  Now for the explanation of the above code: The characters < will change the direction to left, this saves us four bytes but makes it more difficult to read.. Here's how the code would look like without doing this: BbB$K0K21|
@.1,"-"r<
@.([)<

The combinator BbB ensures that K0 and K2 get grouped as one expression each, here's the more verbose code:

$(K0)(K2)1| @.1,"-"r< @.([)<  Okay now it's quite readable: First $ will apply the input so we'll have a sign-extended Church numeral as current expression. Applying K0 (constant 0) will evaluate to KK0 (which will "swallow" the next two arguments) in the case of a negative number, in the case of a non-negative number it simply vanishes. In the case of a positive number we'll have K2 which will swallow the argument 1 and else we'll finally get 1.

Summing up the function $(K0)(K2)1 gives the following numbers (regular Church numerals): if input < 0: return 0 elif input > 0: return 2 else: return 1  The command | will set the direction down iff the current expression evaluates to 0 and up in the other case. • The second line is thus only relevant if the input was negative and it simply prints -1 and terminates • In the other case (ie. hitting the third line) it applies the current expression to [ which decrements it by 1, prints the expression (as a numeral) and terminates ### Disclaimer It might look like the above extension was done just to make this task easier, however this is not the case. In fact most definitions in the untyped (or rather uni-typed) lambda calculus are made because they simplify a lot of operations that one could be interested (such as Booleans or the Church numerals themselves). As an example the function abs could be "implemented" by just applying the identity function to such an extended numeral which will get rid of one lambda abstraction (and in case of a negative number, keep the absolute value as is). If you're interested, here is an article that talks more about this definition which is worth a read. # Yabasic, 16 bytes Anonymous function that takes input as a number, n, and output to STDOUT input""n ?sig(n)  Try it online! # Perl 5, 9 + 1 (-p) = 10 bytes $_=$_<=>0  Try it online! # Pyt, 1 byte ±  Try it online! Boring built-in answer (padding for body length) # Lua (51 Bytes) n=tonumber(...) print(n<0 and -1 or n>0 and 1 or 0)  ... is the variable that represents arguments in lua, tonumber(...) converts the first argument to a number. also in lua a and b or c is a structure that returns b if a is truthy or c if a is falsy, you can nest this structure as well • Answers should be either functions or full programs. This doesn't seem to be able to take input. N is also guaranteed to be an integer – Jo King Feb 17 '18 at 2:01 # Stax, 2 bytes :+  Run and debug online! ## Explanation Added for completeness. It is a builtin, but all built-ins starting with a colon in Stax is actually a macro defined using other Stax operations. Internally it is defined as c0>s0<-, which is simply (x>0)-(x<0). SHELL ( 20 Bytes ) sed s/[1-9][0-9]*/1/  tests: echo "789" | sed s/[1-9][0-9]*/1/ 1 echo "-789" | sed s/[1-9][0-9]*/1/ -1 echo "0" | sed s/[1-9][0-9]*/1/ 0  # Swift, 44 bytes func s(i:Int)->Int{return i>0 ?1:i<0 ? -1:0}  Strange spacing around the ternary options, I know, but this was the shortest way. Try it online! # Brain-Flueue, 40 bytes {([({})]){({}())<>([{}()()])<>}}(<>[]{})  Try it online! ## Readable version { ([({})]) { ({}())<> ([{}()()])<> } } (<>[]{})  # MachineCode, 26 bytes 31c085ff0f9fc0c1ef1f29f8c3  Requires the i flag for integer output. Input must be appended to the code on a separate line. This is equivalent to the C code (n>0)-(n<0). Try it online! Alternatives with the same bytecount: • 31c085ff0f95c0c1ff1f09f8c3 - Try it online! Equivalent to the highest voted C submission. • 89f8c1ff1ff7d8c1e81f01f8c3 - Try it online! Equivalent to this C code. ## Canvas, 3 2 bytes ⤢÷  Try it here! This might be the shortest solution without a builtin that does the problem for you (I'm looking at you, Jelly.) Explanation: ⤢÷ | *Full code* ÷ | Divide | The input (implicit) ⤢ | By its absolute value  • Canvas doesn't interpret 0/0 as 0, it actually errors & removes the 2 items without pushing anything (though I'm about to change that as 0 makes much more sense than nothing). The reason that 0 is outputted is that the stack contains an infinite amount of the inputs. And because of that you can actually remove the ： for 2 bytes May 5 '18 at 13:46 ## F#, 140 bytes open Checked let s n= if n=0 then 0 else try let mutable p=n while p<>0 do p<-p+1 -1 with| :? System.OverflowException->1  Try it online! Basically, if the number is non-zero, keep adding 1 to it until you get either 0 (so the original value was negative) or an overflow (so the original value was positive). That's all right, isn't it? # naz, 64 bytes 9a5m2x1v3a2x2v1x1f1o0m1a1o0x1x2f1o0x1x3f1r3x1v1e3x2v2e0m1a1o0x3f  Explanation (with 0x commands removed) 9a5m2x1v # Set variable 1 equal to 45 ("-") 3a2x2v # Set variable 2 equal to 48 ("0") 1x1f1o0m1a1o # Function 1 # Output once, set the register equal to 1, and output again 1x2f1o # Function 2 # Output once 1x3f # Function 3 1r # Read a byte of input 3x1v1e # Jump to function 1 if the register equals variable 1 3x2v2e # Jump to function 2 if the register equals variable 2 0m1a1o # Otherwise, set the register equal to 1 and output 3f # Call function 3  # Keg, -hr, 13 bytes :0<[0;|0>[1|0  Try it online! A very simple switch like comparison happening here. # 05AB1E, 2 bytes A signum built-in. .±  Try it online! # Gol><>, 8 bytes I:SA:?,h  Try it online! ### How it works I:SA:?,h I Input as number; [n] : Duplicate; [n n] SA Absolute value; [n abs(n)] : Duplicate again; [n abs(n) abs(n)] ? Pop one; if it is zero, skip next command , Nonzero n: Divide n by abs(n) h Print top as number and exit  # Gol><>, 11 bytes I:0(qm$0)+h

Try it online!

### How it works

I:0(qm$0)+h I Input as number : Duplicate top 0( Change top to "top < 0" q If top is true... m$      Push -1 and swap top two; the stack is [-1 x]
Otherwise, skip two commands (m\$); the stack is [x]
0)    Change top to "top > 0"
+   Add top two
h  Print top as number and halt


text:
Find the elements in a set-with-duplicates for top-$K$ frequencies. Two approaches are proposed: sampling and coarse counting. Sampling is to take $s$ samples from a pool of $N$ and count for the frequencies in $s$. The result is then scaled by $N/s$. Afterwards, report those with scaled frequency larger than the threshold. However, this approach usually produce both false-positives and false-negatives and the elimination of them are non-trivial.

Coarse counting is use an array of $m$ counters and a hash function $h$ that maps an into into one of the $m$ possible counters. The procedure is to scan the pool for every item $v$, and increment the corresponding counter $h(v)$. Afterwards, scan the pool once again for those items with the counter $C[h(v)]$ greater than threshold and count for its frequency (individually). Note that in the second count, no false-negative can happen and after the second count, we can filter out the false-positives as well.

Chapter 4 discuss some more complex techniques. DEFER-COUNT is to firstly sample $% $ items and select the $% $ most frequent targets. Record these $f$ targets in $F$. Then do coarse counting but skip all those already in $F$. Then append the heavy items into $F$ and remove false positives by second scan. This is to push down the noise floor created by the already-known heavy targets in the coarse counting so that other unknown heavy targets can be easier to spot out. But this requires to choose the value of $s$ and $f$, as well as it splits the main memory into sample set and counting buckets.

MULTI-LEVEL is another algorithm. It takes $s$ sample and for every sample $v$, increment the count $C[h(v)]$ with hash function $h$. Afterwards, mark the $i$-th bucket as potentially heavy if $C[i]\frac{n}{s}$ greater than threshold $T$. Then for each potentially heavy bucket, allocate some auxiliary buckets. For the second scan, initialize the old counter to zero and increment as usual. But for potentially heavy ones, perform a second hash function $h_2(.)$ in addition to $h(.)$ and count using the auxiliary bucket. This algorithm does not store explicitly the potentially heavy items. Although memory is splitted between primary and auxiliary buckets.

MULTI-STAGE algorithm handles memory more efficiently. It does pre-scan just like MULTI-LEVEL but instead of allocate aux buckets for every potentially heavy buckets, it allocates a common pool for auxiliary buckets. In the scan, it increments $C[h(v)]$ for all non-heavy $v$ but increment the aux bucket $B[h_2(v)]$ instead if $v$ is heavy. Because a common pool can be larget than local pool, we are less likely to have heavy elements collide with light elements in the aux buckets. Which this intuition tells its superiority over MULTI-LEVEL.

The above are the ‘hybrid’ algorithms for the iceberg query. Some subtle improvement (Ch.5-6) also proposed in the paper (such as the use of multiple hash functions) and some case studies (Ch.7) are done.

## Bibliographic data

@inproceedings{
title = "Computing Iceberg Queries Efficiently",
author = "Min Fang and Narayanan Shivakumar and Hector Garcia-Molina and Rajeev Motwani and Jeffrey D. Ullman",
booktitle = "Proc. Internaational Conference on Very Large Databases (VLDB'98)",
}

format: plain


text:
• Browse all
Measurement of the Drell-Yan Cross Section in $pp$ Collisions at $\sqrt{s}=7$ TeV

The collaboration
JHEP 1110 (2011) 007, 2011

Abstract (data abstract)
CERN-LHC. Measurement of the differential cross sections for inclusive production of di-muon and di-lepton pairs in proton proton collisions at a centre-of-mass energy of 7 TeV from a data sample of total integrated luminosity of 36 pb-1. The differential cross section which is normalized to the measured cross section in the Z0 region (60 to 120 GeV) covers the di-lepton invariant mass range from 15 to 600 GeV. Cross sections are given both for full phase space and within the detector acceptance.

• #### Table 1

Data from T 11,F 4

10.17182/hepdata.57980.v1/t1

The DY spectrum normalized to the Z0 region and to the mass bin widths.

• #### Table 2

Data from T 8,F 4

10.17182/hepdata.57980.v1/t2

The DY spectrum normalized to the Z0 region for the dimuon channel. Results are for within the detector acceptance(DET) and...

• #### Table 3

Data from T 8,F 4

10.17182/hepdata.57980.v1/t3

The DY spectrum normalized to the Z0 region for the dielectron channel. Results are for within the detector acceptance(DET) and...


text:
# Lesson 8: Similar Triangles

Let’s look at similar triangles.

## 8.1: Equivalent Expressions

Create three different expressions that are each equal to 20. Each expression should include only these three numbers: $4$, $\text- 2$, and $10$.

## 8.2: Making Pasta Angles and Triangles

Your teacher will give you some dried pasta and a set of angles.

1. Create a triangle using three pieces of pasta and angle $A$. Your triangle must include the angle you were given, but you are otherwise free to make any triangle you like. Tape your pasta triangle to a sheet of paper so it won’t move.
1. After you have created your triangle, measure each side length with a ruler and record the length on the paper next to the side. Then measure the angles to the nearest 5 degrees using a protractor and record these measurements on your paper.
2. Find two others in the room who have the same angle $A$ and compare your triangles. What is the same? What is different? Are the triangles congruent? Similar?

3. How did you decide if they were or were not congruent or similar?
2. Now use more pasta and angles $A$, $B$, and $C$ to create another triangle. Tape this pasta triangle on a separate sheet of paper.
1. After you have created your triangle, measure each side length with a ruler and record the length on the paper next to the side. Then measure the angles to the nearest 5 degrees using a protractor and record these measurements on your paper.
2. Find two others in the room who used your same angles and compare your triangles. What is the same? What is different? Are the triangles congruent? Similar?

3. How did you decide if they were or were not congruent or similar?

3. Here is triangle $PQR$. Break a new piece of pasta, different in length than segment $PQ$.

• Tape the piece of pasta so that it lays on top of line $PQ$ with one end of the pasta at $P$ (if it does not fit on the page, break it further). Label the other end of the piece of pasta $S$.
• Tape a full piece of pasta, with one end at $S$, making an angle congruent to $\angle PQR$.
• Tape a full piece of pasta on top of line $PR$ with one end of the pasta at $P$. Call the point where the two full pieces of pasta meet $T$.
1. Is your new pasta triangle $PST$ similar to $\triangle PQR$? Explain your reasoning.

2. If your broken piece of pasta were a different length, would the pasta triangle still be similar to $\triangle PQR$? Explain your reasoning.

## 8.3: Similar Figures in a Regular Pentagon

1. This diagram has several triangles that are similar to triangle $DJI$.

1. Three different scale factors were used to make triangles similar to $DJI$. In the diagram, find at least one triangle of each size that is similar to $DJI$.
2. Explain how you know each of these three triangles is similar to $DJI$.
2. Find a triangle in the diagram that is not similar to $DJI$.

## Summary

We learned earlier that two polygons are similar when there is a sequence of translations, rotations, reflections, and dilations taking one polygon to the other. When the polygons are triangles, we only need to check that that both triangles have two corresponding angles to show they are similar—can you tell why?

Here is an example. Triangle $ABC$ and triangle $DEF$ each have a 30 degree angle and a 45 degree angle.

We can translate $A$ to $D$ and then rotate so that the two 30 degree angles are aligned, giving this picture:

Now a dilation with center $D$ and appropriate scale factor will move $C'$ to $F$. This dilation also moves $B'$ to $E$, showing that triangles $ABC$ and $DEF$ are similar.


text:
How do you add -9/8+7/4?

Question:

How do you add -9/8+7/4?

Similar Solved Questions

Be sure to answer all parts:The reaction24_Bis second order in A with rate constant of 29.1 1at 25'C.(a) Starting with [AJo 0.00717 M, how long will it take for the concentration ofA to drop to 0.00180 M(b) Cakculate the half-life of the reaction for [AJo 0.00717 M:(c) Calculate the half-life of the reaction for [AJo 0.00237 M:
Be sure to answer all parts: The reaction 24_B is second order in A with rate constant of 29.1 1 at 25'C. (a) Starting with [AJo 0.00717 M, how long will it take for the concentration ofA to drop to 0.00180 M (b) Cakculate the half-life of the reaction for [AJo 0.00717 M: (c) Calculate the half...
5. You observed that the time your friend Alice talks on a phone conversation is exponentially...
5. You observed that the time your friend Alice talks on a phone conversation is exponentially distributed with mean 5 minutes. You call her one morning and her line is busy. Assuming that she is in a phone conversation: (a) (8.5 pts) What is the probability that she would finish the conversation in...
What are 13 and 14? Question 13 (5 points) For the following reaction: Cu(s) + Ni2+...
what are 13 and 14? Question 13 (5 points) For the following reaction: Cu(s) + Ni2+ (aq) the Eºcell for the reaction is Ni(s) + Cu2+ (aq) none of the choices 0.06 v -0.06 v 0.62 v -0.62 v Question 14 (5 points) The Eºcell For the reaction: 2 A13+ (aq) + 3 Cu(s) → 2 Al(s) + 3 Cu2+ (...
1. An equilibrium mixture of CH.COH and CHCO,has a pH of 4.8. The equino equation is...
1. An equilibrium mixture of CH.COH and CHCO,has a pH of 4.8. The equino equation is given below: CH3CO.H (aq) + H20 (1) = CH,CO2 (aq) + HO* (aq) Answer the following questions when the pH of the solution is adjusted to 2.8. 4. What happens to the concentration of H3O+ (aq) when pH changes from 4.8 ...
The area of the parallelogram with vertices A(1,0}, B(0,1), C(-1,0) and D(O,-1) is equal to:
The area of the parallelogram with vertices A(1,0}, B(0,1), C(-1,0) and D(O,-1) is equal to:...
2. Central Limit Theorem Aa Aa Imagine that you are doing an exhaustive study on the...
2. Central Limit Theorem Aa Aa Imagine that you are doing an exhaustive study on the children in all of the preschools in your school district. You are particularly interested in how much time children spend with parents on weekdays You find that for this population of 2,431 children, the average nu...
MATH.233.600 Linear Sys & Diff EquationsShow the details of your work:Use an appropriate substitution to convert the following differential equation into a separable equation. Then solve it:= Cos (x+y) dx
MATH.233.600 Linear Sys & Diff Equations Show the details of your work: Use an appropriate substitution to convert the following differential equation into a separable equation. Then solve it: = Cos (x+y) dx...
Problem 2: Based on SO many years of experience_ statistics professor has found that 88% of students who don' do the homework don pass the exam; while 90% of students who do the homework pass the exam: Thirteen percent of the students don't do the homework: (a) (1.5 points) What percent of students pass the exam? (Keep or more decimal places)(b) (1.25 points) Of students who pass the exam, what percent haven" done the homework? (Keep or more decimal places)(c) (1.25 points) Based
Problem 2: Based on SO many years of experience_ statistics professor has found that 88% of students who don' do the homework don pass the exam; while 90% of students who do the homework pass the exam: Thirteen percent of the students don't do the homework: (a) (1.5 points) What percent of...
Stakeholder support is necessary for a successful change proposal project implementation. Consider your internal stakeholders, such...
Stakeholder support is necessary for a successful change proposal project implementation. Consider your internal stakeholders, such as the facility, unit or health care setting where the change process is situated, and your external stakeholders, like an individual or group outside the health care s...
Figure: Price Ceilings and Valuation of 100 120 140 44. (Figure: Price Ceilings and Valuation of...
Figure: Price Ceilings and Valuation of 100 120 140 44. (Figure: Price Ceilings and Valuation of Uses) Refer to the figure. Suppose a price ceiling of S15 goes into effect. If the goods a allocated only to the highest value uses, the total consumer surplus in the market would be A) 53,000 B) S500. O...
Hi everyone! I have a physics teacher that isn't willing to help me understand any of...
Hi everyone! I have a physics teacher that isn't willing to help me understand any of this. He hasn't posted what chapters in the textbook and the handout l'm assuming he is referring to is a complete joke! l've printed off everything he posted and I'm lost. There isn't anyth...
Subrn Cehsch - 1 homhnimnan Rory 2 CH3 Iron Lrf tutdlant Tiono 1 L 15 UMaianolhaICH Shl
Subrn Cehsch - 1 homhnimnan Rory 2 CH3 Iron Lrf tutdlant Tiono 1 L 1 5 U MaianolhaICH Shl...
Answer the following Control Systems Question. Find The break away point is at s =   with...
Answer the following Control Systems Question. Find The break away point is at s =   with gain K =  . The break in point is at s =   with gain K = C(s) R(s) G(s) Here, G(s)+8(0+10) 8+11) (s+14)...
3. a Find Rea for the circuit given in Figure 3. 42 12 Rea 352 392...
3. a Find Rea for the circuit given in Figure 3. 42 12 Rea 352 392 Figure 3 [2 marks] [CLO1, PLOI, C3] b. Convert the delta (A) network in Figure 4, to an equivalent star (Y) network. R 3100 152 Figure 4 [2 marks] (CLO1, PLOI, C3)...
Qick Express is responding to criticisms from customers about late delivery of parcels by initiating new procedures to alleviate this problem_ They have been assured that this change would result in a late rate of 10 percent: After 6 months of using the suggested new procedures Qick Express decided to conduct an investigation into the late delivery claim by posting 21 parcels to various parts of the country: 5 parcels arrived late at their destinations_Calculate the estimate of the proportion o
Qick Express is responding to criticisms from customers about late delivery of parcels by initiating new procedures to alleviate this problem_ They have been assured that this change would result in a late rate of 10 percent: After 6 months of using the suggested new procedures Qick Express decided...
Set 2: Problem 12 Prev Up Next pt) Iff(x) 2xInkx) find f' (7). Answer: Preview Answers Submit Answers You have attempted this problem 7 times. Your overall recorded score is 0% You have unlimited attempts remaining: Email instructor...
[4points] mirror is desiged aS roctangle with semicircle 0 top of ic. The perimeter of it is suppased to be 95cmn. Find the radius of the somicirele that gives the largest area for the mitror: Use the 8 stcps we saw clnxs for similat problems and exfluin %ach step cleatly in the samne order:
[4points] mirror is desiged aS roctangle with semicircle 0 top of ic. The perimeter of it is suppased to be 95cmn. Find the radius of the somicirele that gives the largest area for the mitror: Use the 8 stcps we saw clnxs for similat problems and exfluin %ach step cleatly in the samne order:...
Wnhal volume of {NHjlg) in | Lters alT 2 164'C and P = 655 torr; Is required reactor 0f NHa with HCOa to prepare 142 g of (NHAbCO3 by the;
Wnhal volume of {NHjlg) in | Lters alT 2 164'C and P = 655 torr; Is required reactor 0f NHa with HCOa to prepare 142 g of (NHAbCO3 by the;...
= H 1 onbioi 8 Jaintno Dlano Oreo Dudo (igure , (magnutude Mate 4 01 8 Jl direction} 3 abot Boint lengtFFiguro1 Part G 1 1 tatvorque magmaludu = drection ] 8 1 lyuv in case 1Submlt ncorroct; 41.5692 Aqain attempts rmnainintg
= H 1 onbioi 8 Jaintno Dlano Oreo Dudo (igure , (magnutude Mate 4 01 8 Jl direction} 3 abot Boint lengtF Figuro 1 Part G 1 1 tatvorque magmaludu = drection ] 8 1 lyuv in case 1 Submlt ncorroct; 41.5692 Aqain attempts rmnainintg...
How do you solve 3x+y=4 and 2x+y=1?
How do you solve 3x+y=4 and 2x+y=1?...


text:
How To Change Font Of Tagline In Wordpress, Wordpress Font Size, Old Ford Figo Dimensions, Houses For Sale Wv11 2pz, Prayer For Someone To Forgive You, Fresh Aire V, Santana Hope You're Feeling Better Live, 2017 Jayco Hummingbird 16fd Specs, Bagyo Drawing Poster, Misamis Oriental Places, Shanghai Science And Technology Museum Architecture, Pet Friendly Cabins Near Me, Stranded Deep Shipwrecks, Behr Gray Paint Colors For Kitchen Cabinets, 765 Ilcs 5/10, 10 Functions Of Management, Ajax Tank Speed, Fairy Garden Lily Pond, Other Names For Lucky, Full Moon Mudra, When Was Ddt Banned, Dialogue Between Two Friends Fighting, Olympic Rod Price, Ajax Tank Speed, Types Of Speech And Language Disorders, Sony Mhc-ec69i Manual, Cheekh Episode 2, Skyfactory 4 Fission Reactor Design, My Favourite Animal Essay, " /> How To Change Font Of Tagline In Wordpress, Wordpress Font Size, Old Ford Figo Dimensions, Houses For Sale Wv11 2pz, Prayer For Someone To Forgive You, Fresh Aire V, Santana Hope You're Feeling Better Live, 2017 Jayco Hummingbird 16fd Specs, Bagyo Drawing Poster, Misamis Oriental Places, Shanghai Science And Technology Museum Architecture, Pet Friendly Cabins Near Me, Stranded Deep Shipwrecks, Behr Gray Paint Colors For Kitchen Cabinets, 765 Ilcs 5/10, 10 Functions Of Management, Ajax Tank Speed, Fairy Garden Lily Pond, Other Names For Lucky, Full Moon Mudra, When Was Ddt Banned, Dialogue Between Two Friends Fighting, Olympic Rod Price, Ajax Tank Speed, Types Of Speech And Language Disorders, Sony Mhc-ec69i Manual, Cheekh Episode 2, Skyfactory 4 Fission Reactor Design, My Favourite Animal Essay, " />

# calculate force constant from vibrational frequency

Using this matrix we can find the vectors corresponding to the rotations and translations. At the moment my geometry file does not contain water. Its motion is purely translational. Why does the kinetic theory apply to gases? Regardless, you have 2 unknowns and thus the problem you present isn't solvable. To demonstrate this, I have run B3LYP/3-21G* optimizations on water, starting with geometry B from Table 3, with Opt, Opt=Tight and Opt=VeryTight. I'm waiting on email conformation for the GMX user group, but this is in reply to Reviewers so I'm pressed for time and asking here. In other words, the geometry used for vibrational analysis must be optimized at the same level of theory and with the same basis set that the second derivatives were generated with. Force constants are generally assigned to reproduce QM vibrational data. The output for water HF/3-21G* looks like this: In general, the frequencies for for rotation and translation modes should be close to zero. First, we should find the reduced mass using the ISOTOPIC molar masses of each element: #""_(8)^(16) "O":# #"15.994915 g/mol"# i am currently carrying out a gromacs simualtion and the simulation has been going on for over 20days because the system is heavy but i will like to know how to check the current state of the simulation so as to know if the wall time will be enough. The rest is simply applying the appropriate conversion factors: from a single molecule to a mole, from hartrees to joules, and from atomic mass units to kilograms. I have simulated a protein for 100ns and the cluster analysis is performed. A copy of is diagonalized, yielding a set of 3N eigenvectors and 3Neigenvalues. The total energy $$E$$ (Kinetic+Potential) is obtained by solving the Schrödinger equation: $-\dfrac{h^2}{8\pi^2\mu_{AB}} \dfrac{d^2\psi}{dx^2}+\dfrac{1}{2} kx^2\psi = E\psi$. But in the equilibration step, the job halts indicating some segmentation fault. Now that we have coordinates in the rotating and translating frame, we need to transform the Hessian, (still in mass weighted cartesian coordinates), to these new internal coordinates (INT). That is, if a molecule, initially in its ground vibrational state, could be excited so that it vibrated at a given frequency, then that molecule could absorb a photon that vibrates at the same frequency. This is possible if n. Find the number of vibrational modes for the following molecules: $$NH_3$$, $$C_6H_6$$, $$C_{10}H_8$$, $$CH_4$$, $$C_2H_2$$(linear). Can I perform Principal component analysis (PCA) in gromacs using Desmond trajectories? This is a good combination to use for systems with hindered rotors, or if exact conformation is of concern. Sometimes 2 or 3 modes may have the same frequency but that does not change the fact that they are distinct modes; these modes are called degenerate. Likewise the same is true for vibrational motion. A set of wave functions $$\psi_n$$) and the corresponding Eigenvalues $$E_n$$ are obtained. The later frequencies are calculated after projecting out the translational and rotational modes. So there are only 2 rotational degrees of freedom for any linear molecule leaving 3N-5 degrees of freedom for vibration. And that'll give it to you in kilograms. Desmond can not perform this as I got to know. The three vectors ( , , ) of length 3N corresponding to translation are trivial to generate in cartesian coordinates. Using a single reference method will yield different frequencies for the and vibrations, while a multireference method shows the cylindrical symmetry you might expect. Diatomics are simply treated the same way as polyatomics, rather than using a different coordinate system. The number of vibrational normal modes can be determined for any molecule from the formula given above. So, how “close to zero” is close enough? Let's quickly go through the second bet, the second bet is just pretty much the same. Vibration-Rotation Spectrum of HCl Add annotation to spectrum A classic among molecular spectra, the infrared absorption spectrum of HCl can be analyzed to gain information about both rotation and vibration of the molecule. 2006. So we go from the fundamental equation, which you need to remember, that mu in hertz is equal to one over two pi, square root of K over mu. Then, you therefore need to convert from #"cm"^(-1)# to #"s"^(-1)# to get the units to work out for #E_(upsilon)#: where #c = 2.998xx10^10# #"cm/s"# is the speed of light in the proper units. . Compiled SIMD instructions: SSE2, GROMACS could use AVX_512 on this machine, which is better. whereas the experimental force constant in this reference is #"1901.82 N/m"# (derived from #tildeomega_e = 2169.76689(8)# #"cm"^(-1)#, which is just another notation for #tildenu_e#), while in this reference it is #"1860 N/m"# for #tildenu_0 ~~ "2141.42 cm"^(-1)#. Calculate the vibrational energy in Joules per mole of a normal mode in question 3, in its ground state of $$n=0$$. There is an important point worth mentioning before starting. So we go from the fundamental equation, which you need to remember, that mu in hertz is equal to one over two pi, square root of K over mu. Okay. So you can actually break this down. 18621 views (You can check this in the output). All right? I’d like to thank John Montgomery for his constructive suggestions, Michael Frisch for clarifying several points, and H. Berny Schlegel for taking the time to discuss this material with me. $x(t)= A \sin \left( 2\pi \nu t \right)$, $\nu=\dfrac{1}{2\pi} \sqrt{\dfrac{k}{\mu_{AB}}}$. In the water frequency calculation above, using tighter convergence criteria makes almost no difference in terms of energy or bond lengths, as Table 2 demonstrates.


text:
It is currently 18 Mar 2018, 01:10

### 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
Your Progress

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

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# What is the length of the line segment that connects A to B ?

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics
Author Message
TAGS:

### Hide Tags

Math Expert
Joined: 02 Sep 2009
Posts: 44287
What is the length of the line segment that connects A to B ? [#permalink]

### Show Tags

24 Oct 2017, 01:25
00:00

Difficulty:

15% (low)

Question Stats:

89% (00:24) correct 11% (00:24) wrong based on 57 sessions

### HideShow timer Statistics

What is the length of the line segment that connects A to B ?

(A) $$\sqrt{3}$$

(B) 2

(C) $$2\sqrt{2}$$

(D) 4

(E) 8

[Reveal] Spoiler:
Attachment:

2017-10-24_1216.png [ 7.83 KiB | Viewed 659 times ]
[Reveal] Spoiler: OA

_________________
GMAT Forum Moderator
Joined: 28 May 2014
Posts: 477
GMAT 1: 730 Q49 V41
Re: What is the length of the line segment that connects A to B ? [#permalink]

### Show Tags

24 Oct 2017, 02:17
Distance between two co-ordinate points = √[(x2−x1)^2+(y2−y1)^2]

Distance between A & B = √[(1−(-1))^2+(3−5)^2] = √[(1+1)^2+(−2)^2] = √[4+4] = 2√2

Ans: C.
_________________
VP
Joined: 22 May 2016
Posts: 1416
What is the length of the line segment that connects A to B ? [#permalink]

### Show Tags

25 Oct 2017, 16:30
Bunuel wrote:

What is the length of the line segment that connects A to B ?

(A) $$\sqrt{3}$$

(B) 2

(C) $$2\sqrt{2}$$

(D) 4

(E) 8

[Reveal] Spoiler:
Attachment:
2017-10-24_1216.png

Base of triangle = 2

|$$x_2 - x_1| =|1 -(-1)| = 2$$

Height of triangle = 2

|$$y_2 - y_1| = |5 - 3| = 2$$

It's an isosceles right triangle (45-45-90) with side length ratio of $$x: x: x\sqrt{2}$$

Sides = $$2$$
Hypotenuse =
distance between A and B = $$2\sqrt{2}$$

Answer C
_________________

At the still point, there the dance is. -- T.S. Eliot
Formerly genxer123

What is the length of the line segment that connects A to B ?   [#permalink] 25 Oct 2017, 16:30
Display posts from previous: Sort by

# What is the length of the line segment that connects A to B ?

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics

 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:
How can the proof by induction be reliable when it depends on the number of steps?

Yesterday, I got a math problem as follows.

Determine with proof whether $\tan 1^\circ$ is an irrational or a rational number?

My solution (method A)

I solved it with the following ways.

I can prove that $\tan 3^\circ$ is an irrational, the proof will be given later because it takes much time to type.

Let's assume that $\tan 1^\circ$ is a rational number. As a result, $$\tan 2^\circ = \frac{2 \tan 1^\circ }{1-\tan^2 1^\circ}$$ becomes a rational number. Here we don't know whether $\tan 2^\circ$ is an irrational or a rational. Let's consider each case separately as follows:

• If $\tan 2^\circ$ is actually an irrational then a contradiction appears in $\tan 2^\circ = \frac{2 \tan 1^\circ}{1 - \tan^2 1^\circ}$. Thus $\tan 1^\circ$ cannot be a rational.

• If $\tan 2^\circ$ is actually a rational then we can proceed to evaluate $$\tan 3^\circ = \frac{\tan 2^\circ + \tan 1^\circ}{1 - \tan 2^\circ \tan 1^\circ}$$ A contradiction again appears here because I know that $\tan 3^\circ$ is actually an irrational. Thus $\tan 1^\circ$ cannot be a rational.

For both cases whether $\tan 2^\circ$ is rational or not , it leads us to the conclusion that $\tan 1^\circ$ is an irrational. End.

My friend's solution (Method B)

Assume that $\tan 1^\circ$ is a rational number. If $\tan n^\circ$ ($1\leq n\leq 88$, $n$ is an integer) is a rational number, then $$\tan (n+1)^\circ = \frac{\tan n^\circ + \tan 1^\circ}{1-\tan n^\circ \tan 1^\circ}$$ becomes a rational number.

Consequently, $\tan N^\circ$ ($1\leq N\leq 89$, $N$ is an integer) becomes a rational number. But that is a contradiction, for example, $\tan 60^\circ = \sqrt 3$ that is an irrational number.

Therefore, $\tan 1^\circ$ is an irrational number.

My friend's solution with shortened inteval (Method C)

Consider my friend's proof and assume that we only know that $\tan 45^\circ =1$ which is a rational number. Any $\tan n^\circ$ for ($1\leq n\leq 44$, $n$ is an integer) is unknown (by assumption).

Let's shorten his interval from ($1\leq n\leq 88$, $n$ is an integer) to ($1\leq n\leq 44$, $n$ is an integer).

Use his remaining proof as follows.

For ($1\leq n\leq 44$, $n$ is an integer), $$\tan (n+1)^\circ = \frac{\tan n^\circ + \tan 1^\circ}{1-\tan n^\circ \tan 1^\circ}$$ becomes a rational number.

Consequently, $\tan N^\circ$ ($1\leq N\leq 45$, $N$ is an integer) becomes a rational number.

Based on the assumption that we don't know whether $\tan n^\circ$ for ($1\leq n\leq 44$, $n$ is an integer) is rational or not, we cannot show a contradiction up to $45^\circ$,

Questions

• Can we conclude that $\tan 1^\circ$ is a rational number in method C as there seems no contradiction?

• Is the proof by induction correctly used in method B and C?

• Is the proof by induction in method A the strongest?

• Method C does not appear to prove anything. I prefer method B over method A (they are much the same) as I do not know about $\tan 3^\circ$, though I do know about $\tan 30^\circ$ – Henry Sep 16 '15 at 8:08
• @Arthur But OP does not say that. He says that if $x,y$ are rational, then $\frac{x+y}{1-xy}$ is also rational. This is obviously true. – 5xum Sep 16 '15 at 8:16

The inductions in $B$ and $C$ are correct, and they simply continue what you did in $A$. Because you can express $tan(n+1)$ as a rational fraction in $tan(n)$ and $tan(1)$, you can have by induction $tan(n)$ as a fraction of $tan(1)$ only. So if $tan(1)$ is rational, $tan(n)$ too.

The three methods are the same idea, but the only problem with A is that, like you said, the fact that $tan(3)$ is irrational is not obvious, whereas the fact that $tan(30)$ or $tan(60)$ aren't is totally trivial..

In fact, there is also a problem in $C$, is that $tan(45)=1$ is clearly rational, so you cannot conclude anything on $tan(1)$^^

Let $S_n$ be the statement that $\tan n^\circ$ is rational. Then $$\tan (n+1)^\circ = \frac{\tan n^\circ + \tan 1^\circ}{1-\tan n^\circ \tan 1^\circ}$$ shows that $S_1,S_n\implies S_{n+1}$. So by assuming $S_1$ we have by induction. $$S_1\wedge S_1\implies S_1\wedge S_2\implies ...\implies S_1\wedge S_n\text{ etc.}$$ Note how $S_1$ is always a component in each step. Thus if we ever encounter any $S_n$ which is obviously false, we conclude by contraposition that all the statements $S_1\wedge S_k$ for $1\leq k\leq n$ must have been false. This does not leave out the possibility of some $S_k$'s being true. Only $S_1\wedge S_k$ is still not true since $S_1$ is false (because in particular $S_1\wedge S_1$ is false).

Methode A: Corresponds to taking $S_3$ and thus $S_1\wedge S_3$ as contradiction.

Method B: Corresponds to taking $S_{60}$ and thus $S_1\wedge S_{60}$ as contradiction.

Method C: Corresponds to only noticing that $S_{45}$ is true, but not considering that $S_1\wedge S_{45}$ is actually false because $S_1$ is false.

So to conlude, method A and B are very similar allthough $S_3$ and $S_{60}$ may not be equally simple to falsify. Method C tells us virtually nothing regarding $S_1$.

Method B+C combined: We could, on the other hand, conclude from that fact that $S_{45}$ is true but $S_{60}$ is false, that since $$S_1\wedge S_{45}\implies S_1\wedge S_{60}$$ where the latter is false, by contraposition $S_1\wedge S_{45}$ is false already implying $S_1$ to be false.

Method $A$ is overcomplicating things. You do not need to separate the cases based on $\tan(2^\circ)$. You already know that, if $\tan 1^\circ$ is rational, then $\tan 2^\circ$ is rational, so the first bullet of method $A$ is redundant.

Method $B$ is an expansion and improvement of method $A$. It is the only one of the three methods that is complete, because it is obviously true that $\tan 60^\circ$ is irrational, while the irrationality of $\tan 3^\circ$ is not obvious. In fact, the easiest way to prove that $\tan 3^\circ$ is irrational is to repeat the idea of method $B$.

Method $C$ does not prove anything else than the fact that method $C$ cannot prove that $\tan 1^\circ$ is irrational.

Can we conclude that $\tan1^\circ$ is a rational number in method C as there seems no contradiction?

No. B is proof by contradiction plus mathematical inducing.

1. Assume $\tan1^\circ$ is rational.
2. proof by inducing: for any $n>1,n\in\mathbb{N}$,$\tan(n^\circ)$ is rational.(note this uses 1 as basis)
3. find a contradiction: $\tan 60^\circ=\sqrt{3}$ is irrational. But the inducing in 2 is all right, thus disproving the basis 1, ie. $\tan1^\circ$ is rational.

C follows the same assumption 1) and inducing 2), but does not find contradiction. A single case that confirms the conjecture 2) cannot prove conjecture 2), so cannot prove the basis assumption 1).

Is the proof by induction correctly used in method B and C?

B is correct. C does not prove anything, as explained above.

Is the proof by induction in method A the strongest?

method A is not proof by induction. it is a direct proof by contradiction ($\tan1^\circ\to\tan2^\circ\to\tan3^\circ$), but over-complicated.


text:
AI optimal rotation of a rigid body

1. Jul 18, 2012

Snark1994

I'm trying to write AI code for a program, in which a spaceship has to rotate to face a target. I've somewhat idealised the situation - the ship can yaw, pitch and roll with a maximum angular acceleration along each axis.

I'm representing the rotation of the ship relative to the world reference frame, as well as its angular velocity and acceleration as quaternions - so my code to update the ship is essentially:

Code (Text):
d2rot = get_d2rot_somehow()
drot = d2rot * drot
rot = drot * rot
executed at each timestep. The question is essentially what value do I need for d2rot (the second differential of the ship's rotation, if that wasn't clear i.e. angular acceleration) in order for the ship to end up pointing in the right direction fairly quickly?

I've found a couple of papers:

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.175.5952&rep=rep1&type=pdf seems to be doing what I want, but the maths is above my head and from what I understand of the opening page, the authors are working with matrices, not quaternions.

http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19740020927_1974020927.pdf which is a translation of a Russian paper made in the 1970s, and I'm not completely convinced it's trying to solve the same problem.

Thanks for any help / pointers! :)

2. Jul 19, 2012

chiro

Hey Snark1994 and welcome to the forums.

A recommendation I have for the general situation which involves completely dynamic situations from occuring (i.e. aiming when everything is continually moving) is based on an inverse kinematics approach with the search of minimal paths.

If you are making a 3D game where everything is moving, then this approach will in general be a lot better to handle situations of great complexity, especially if you have multiple enemies in a scene.

IK is basically an inverse solver where you have a current bone configuration, an ideal target configuration (i.e. the bone structure) and you need a way to get there through an interpolation (i.e. determine the path entirely in-between the two points).

You could simplify the approach a lot of the degrees of freedom are known and small and use a kind of dampening effect to make the AI approach a lot more fluid and realistic, but if you have complex ship structures or ship structures with their own turrets that can move, I recommend at least looking into IK.

The other thing is if you have multiple turrets on a single mother ship and you want to co-ordinate all of them to have a really cool attack AI, then you can solve a simultaneous IK problem that aligns all of the turrets in the best configuration for the attack phase.

The IK will generate the actual kinematic actions for you to follow so it will calculate at each time-step the bone positions at that step and then you can take those and use them to update your internal world and do whatever else needs to be done.

3. Jul 22, 2012

rorix_bw

AI Game Engine Programming - Brian Schwab

That book has a full implementation of "AI Asteroids" (the old game) implemented with various different forms of vector manipulation and AI types, in order to teach them all. He starts off with a naive FSM that points directly and shoots, and by end of the book there's predictive stuff algos like genetic algorithms and neural nets.

The main thing to remember these days is that players expect an AI to play like a human. It's not going to be good if it obviously cheats or auto-aims with robot-like precision.

4. Jul 22, 2012

Snark1994

Thanks for the replies. I've worked through the first paper with some help, and it turns out to not really be what I'm after anyway.

I've had a look at IK, but it seems to be more tailored to rotating joints etc. and doesn't seem to be able to cope with something that preserves its angular velocity perfectly over time.

I'll have a look at AI Game Engine Programming, it sounds good. RE: cheating, one of my main design goals for the game was that the AI was to operate exactly under the constraints that the player operates under - so while highly precise shooting might be acceptable, depending on difficulty, cheating certainly isn't...
(Before I buy the book, does it cover 3D rotations? It mentions OpenGL in the introduction which suggests it does, but I can't preview the chapters about asteroids...)

EDIT: http://my.safaribooksonline.com/book/programming/game-programming/9781584505723/finite-state-machines/ch15lev1sec3#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODE1ODQ1MDU3MjMvY2gwM2xldjFzZWMz seems to suggest that it is in fact the 'classic' 2D for the asteroids game at least, as he only has turnLeft() and turnRight() routines, not roll/pitch/yaw...

Last edited: Jul 22, 2012
5. Jul 22, 2012

chiro

You can add constraints that various rotation properties be maintained in IK if you wish.

This is more of a solution for say if you had a huge mothership with a dozen turrets being co-ordinated across the board for various situations.

Also, you can use this in conjunction with quaternion interpolation to get a smoother transition between rotational transformations.

Again it depends on the complexity and requirements of your game, but the IK provides a general solution to a much more general situation.

6. Jul 22, 2012

rorix_bw

Vector matrix is more common in games than quarternions. Quaternions are faster and don't need trig, but is that a problem on a modern system?

Yes, the book is indeed 2D vectors but that's the same code as 3D vectors, just one less dimension in each matrix.

It's mainly a book on AI but I believe it's relevant because 1) 2d to 3d with vectors isn't crazy hard, and 2) when you say how to do you work out which direction to point, that's more than picking the direct line to the target.

In an FSM you will be in one several possible states (attack, evade etc), and that state has full control over the ship. In blackboard there are several competing modules, each of which inputs a vector and a priority, and the final vector will a weighted combination of all inputs. In a self-learning GA you might never calculate it directly, the system will learn it over time as it plays.

Edit: if you go to vectors, wikipedia actually explains all the math you need for 3d line graphics.
http://en.wikipedia.org/wiki/Rotation_matrix#Rotations_in_three_dimensions

I can do it, but I can't do N-body collision resolution (see my other thread) :-)

Last edited: Jul 22, 2012
7. Jul 23, 2012

Snark1994

Vector matrix is fine, I just have a more intuitive understanding of quaternions, and as far as I'm aware the two are isomorphic so it shouldn't matter which one you use.

Ah, sorry, I must have explained myself badly. I know which direction I need to point - that's relatively trivial, as you noted. That's like picking the position I need the ship to be in - the harder part is manipulating the acceleration of the ship so that it arrives at the desired position. Similarly, for rotations, I know which direction I need to face, but I need to manipulate my angular acceleration so that I end up pointing in the right direction.

This is just the nuts-n'-bolts, before I get to the higher level decisions of what the ship is actually going to do, like attack or evade ;)

One idea I had was some sort of approximation to critically damped SHM, so having two components to guide the angular acceleration: one towards the desired position, and one against the desired velocity

Last edited: Jul 23, 2012
8. Jul 23, 2012

rorix_bw

Is this a maths question (how do i add vectors?) or a programming question (how do i increment the position of the ship each frame of animation, so that it arrives at its destination?)

I suspect the latter

In this case, you will probably have a loop in the game that executes once for each frame of animation, e.g. 60 iterations per second for 60 FPS (frames/sec) graphics.

At the start of loop you clear the screen, then you check for inputs from your player or AI, then you update the positions of the items & check for collisions, then repaint the screen.

A mathematician would probably work out the vector addition required to get to the destination, then divide it by 60 and add it to the current position.

I might just add an arbitary amount and have the computer turn round and punt the other way if it overshoots, in much the same manner as a human would do it.

Actually if that was what your question was, the book I mentioned has the full code for it but it is only 2d vectors.

edit: Actually if this is the question, what you face is a game design decision or gameplay decision based on how you want the AI to play and if it drives like robocop or a human. There's no set rule for it.

Last edited: Jul 23, 2012
9. Jul 24, 2012

Snark1994

Aha, we're getting closer... It is a maths question, but I suspected it might be difficult to solve the problem analytically - so I suspect a more crude programming solution is probably the best way to solve the problem for the purposes of the game.

My problem is not how to animate the motion of the spaceship between two positions. For example, when you said:

this suggests that either the ship has got unlimited velocity (if it travels to any position in the 60 frames) or that you've chosen the position so it corresponds to the points reachable by the spaceship's current speed (i.e. an animation).

My problem is more along the lines of "In this frame, my ship is at r0 with velocity v and needs to get to r1 as soon as possible, so what should my acceleration a be in order to achieve this as quickly as possible?"

My solution to this is as follows:
Code (Text):
//pos = ship position
//dpos = ship speed
//d2pos = ship acceleration
Vector target = player->getPos();
Vector goal = target - pos;
if(dpos.getMagnitude() < 0.0005 && goal.getMagnitude() < 0.0005){
//stop AI ship jittering
pos = target;
dpos = Vector(0,0,0);
} else {
Vector goal_n = goal.normalise();
Vector desired_vel;
if(dpos.dot(goal_n) <= 0){
//Accelerate towards goal, we're moving away from it
desired_vel = goal_n*20;
} else if(goal.getMagnitude() < (dpos.dot(goal_n) * dpos.dot(goal_n)) / (2 * lin_thrust)) {
//according to v[SUP]2[/SUP = u[SUP]2[/SUP]+2as
//we're not gonna make it if we start decelerating, so let's stop
desired_vel = 0;
} else {
//go faster towards goal
desired_vel = goal_n*20;
}
Vector d2pos;
if(dpos == desired_vel) {
d2pos = Vector(0,0,0);
} else {
//lin_thrust is a constant, the maximum linear acceleration the ship is allowed
d2pos = (desired_vel - dpos).normalise() * lin_thrust;
}
dpos += d2pos;
}
pos += dpos;

This has a couple of naïveties, but it generally works okay.

What I am trying to do is the same for rotations - so my code isn't allowed to manipulate the ship's rotation or angular velocity, only its angular acceleration. I have a similar implementation as above for my rotation, but my problem is that the angular equivalents of the SUVAT equations don't work so well for determining when the ship should start to slow its speed of rotation.

Is that a clearer statement of my problem? Sorry for any confusion.

10. Jul 24, 2012

rorix_bw

I think understand the question now. Your ship facing is (0,0,0) degrees and you need to turn to (60, 40, -90) degrees (e.g. 60 yaw, 40 pitch, -90 roll), and you want to model this turning by "newtonian" rockets that obey F=ma, so the ship's facing will start small, increase constantly, then presumumably you fire rockets on the other side to stop it, and it gradualyl stops spinning.

If angular SUVAT is not working for you, do you really need them?

What if you break the angle into its 3 components, treat each as a distance (call 60 degrees a distance of 60 arbitary units), work out what is needed in each component using the same code you have provided as if you had to move 60 units in a straight line with SUVAT, and then recombine them.

From memory (advise you to check it) i think

Code (Text):
z_rot_matrix = [
[1, 0, 0, 0],
[0, cos(xa), sin(xa),0],
[0,-sin(xa),cos(xa),0],
[0,0,0,1]
]
is rotation of a degrees about Z axis. Multiply all 3 them all together, apply scaling matrix and combine with ship. (Really advise you to double check!)

I apologise if I am missing something. I can 3d but I don't know the formal technical words to express it, as from a programming POV you don't really learn it in the same way a mathematician does (well I didn't anyway).

Last edited: Jul 24, 2012
11. Jul 24, 2012

Snark1994

Aha, yeah, you've got it!

(I don't think your approach would quite work, because Euler angles aren't independent of each other - if you roll right 45° and then yaw left 90°, that's the same as yawing left 90° and then pitching up 45° - but it seems to work alright with quaternions)

Now, that works fine if the ship starts off not rotating relative to the target. However, if it has an initial angular velocity, and that's not in the same direction that it wants to rotate in, then it tends to gyrate about the desired direction (i.e. it can't quite cope with the existing angular velocity).

Would it help if I uploaded a video of what it's doing?

12. Jul 24, 2012

rorix_bw

Actually you've taught me why we do it with 3x4 matrices... hadn't realised angles weren't independent. Is there any reason you are not using matrices?

13. Jul 25, 2012

Snark1994

Not really, I just find quaternions more intuitive... I can visualise what's going on with quaternions better than with matrices, and as the two are isomorphic (i.e. if you can implement something with matrices, then you can implement it with no changes to the fundamental algorithm with quaternions, as far as I know) it didn't really make any difference which one I picked in terms of how difficult the problem is.

14. Jul 25, 2012

chiro

How about using a SLERP with quaternions?

15. Jul 25, 2012

Snark1994

SLERP would still be going down the animation route, wouldn't it? It's just a smooth interpolation between the two quaternions, not an acceleration/deceleration...

16. Jul 25, 2012

chiro

Yes but the parameterization does not have to be linear: you can create a transformation corresponding to the behaviour that is intended that is not necessarily linear.

17. Jul 28, 2012

Snark1994

Sorry, could you give me a pseudo-code example? I'm pretty sure that it doesn't work your way, but I might be wrong. Just to make sure, you're creating a SLERP_magic function that satisfies:

Code (Text):
function SLERP_magic(current_rot,current_drot,target_rot){
//do stuff, return a value for d2pos
}

while game_is_active {
d2rot = SLERP_magic(current_rot,target_rot,current_drot);
current_drot = d2rot * current_drot; //i.e. update drot from d2rot
current_rot = current_drot * current_rot; //i.e. update rot from the new drot
}
which will (in a reasonably efficient manner) make current_rot equal to target_rot

18. Jul 28, 2012

chiro

What I mean is to make the parameter you pass (i.e. t between 0 and 1 inclusive) to vary non-linearly. Instead of going from 0 to 1 in incremental steps that are the same, you can make it go say faster at the start and then let it decay at the end.

Different kinds of behaviours for f(t) where f(t) is in [0,1] and t is in [0,1] give different kinds of behaviours for how the AI rotates itself to approach the target.

If you are continually updating the path every tick so that the SLERP changes in accordance with the new position, then you can base the behaviour of f(t) on things like the dot product of the direction vector of the ship and the vector of the actual ship itself: speed it up when they are not aligned (i.e. dot product < 0) and then make it slow down when they are close (dot product > .05 for example)

You can, by transforming the parameter and how its incremented, directly control how the object moves and what it looks like when it rotates.

19. Jul 30, 2012

Snark1994

Thanks, I understand that a non-linear parameter will give the appearance of an accel/decel rotation, but that's more applicable to animation. I also can't see how it would cope with the case where e.g. the ship is at (Y,P,R) = (90,0,0), wants to get to (0,90,0) and is initially rotating around the yaw axis at 10 deg/second - as the path the ship would take is no longer a linear interpolation but a curve.

I think I can get it to work using something similar to http://www.shiffman.net/itp/classes/nature/week06_s09/seekarrive/ but for rotations. I'm going off on holidays now, and it's not quite working but I suspect it's due to a bug rather than a problem with the method, so I'll see if I can get it fixed when I get back - if I do, I'll post back here with my algorithm.

Thanks for all the suggestions so far!

20. Aug 16, 2012

Snark1994

Well, I haven't got C++ working but my python seems to be working well enough - using the seek/arrive steering behaviour I posted in my last post:

Code (Text):
#!/usr/bin/env python3

from math import sqrt,sin,cos,acos

rot_thrust = 0.01 #degrees per timestep

def main():
rot = Quaternion(1/sqrt(2),0,0,-1/sqrt(2))
d2rot = Quaternion(1,0,0,0)

goal = Vector(0,5,0)
step = 0

while abs(rot.w - 1) > 0.00000001:
step += 1
d2rot = steer(rot,drot,goal)
drot = d2rot * drot
rot = drot * rot

def steer(rot,drot,goal):
desired_drot = get_desired_drot(goal,rot,drot)
desired_d2rot = (desired_drot * drot.inverse()).normalise()
return get_d2rot(desired_d2rot)

def get_desired_drot(goal,rot,drot):
max_speed = 0.0146221 #radians per timestep

dot = Vector(0,1,0).dot(goal.normalise());
axis = goal.cross(Vector(0,1,0)).normalise()
alpha = acos(dot)
if axis == None and dot == 1: #parallel
desired_rot = Quaternion(1,0,0,0)
elif axis == None and dot == -1: #opposite
desired_rot = Quaternion(0,1,0,0)
else:
desired_rot = Quaternion(cos(alpha/2),axis.x*sin(alpha/2),axis.y*sin(alpha/2),axis.z*sin(alpha/2))

to_desired = (desired_rot * rot.inverse()).normalise()
dist = acos(to_desired.w)*2;
if dist > 0:
axis = Vector(to_desired.x,to_desired.y,to_desired.z).normalise()
if dist < slow_down_dist:
theta = max_speed*dist/slow_down_dist
else:
theta = max_speed
return Quaternion(cos(theta/2),axis.x*sin(theta/2),axis.y*sin(theta/2),axis.z*sin(theta/2))
else:
return Quaternion(1,0,0,0)

def get_d2rot(desired):
axis = Vector(desired.x,desired.y,desired.z).normalise()
desired_theta = acos(desired.w)*2
assert(desired_theta >= 0)


text:
# Question #8c664

Sep 13, 2017

The first two, $\text{H"_2}$ and $\text{F"_2}$ are diatomic molecules composed of two atoms of the same element.
The second two, $\text{CO"_2}$ and $\text{CF"_4}$, are compounds formed by the covalent bonding of atoms of two or more elements.


text:
# Calculate apsides without knowing eccentricity

How would one go about determining the apsides of an orbit, knowing only the current distance between the 2 bodies, the orbital velocity, and the period? Every formula I've seen requires eccentricity, but conveniently, every formula for eccentricity requires the apsides. Surely there must be some way to find one without knowing the other?

• Do you have measures of the distance as a function of time perhaps? Or are the bodies co-orbital? In latter case, there simply isn't enough information to infer their orbit, unless you also have ratios (in which case it might be possible, but tricky). Dec 12 '13 at 3:45
• @TildalWave I do not have a formula like that, else I would be able to find the apsides just by minimizing and maximizing the function. I have the relative velocity, relative position, and semi-major axis, as well as the gravitational parameters of the planet and the vessel in orbit. Dec 13 '13 at 0:19

You can then use Kepler's second law to find the semi-minor axis as $$\frac{1}{2} r v = \frac{\pi a b}{P}$$ where $r$ the current distance and $v$ the current velocity, $P$ is the period and $a$ and $b$ give the respective semi-major and semi-minor axes.
From $b$ you find the eccentricity as $$b=a \sqrt{1-e^2}$$
And the apsides follow as $$\mathrm{periapsis} = a ( 1 - e )$$ $$\mathrm{apoapsis} = a ( 1 + e )$$


text:
main-content

## Swipe to navigate through the chapters of this book

Published in:

2019 | OriginalPaper | Chapter

# Approximate Probabilistic Relations for Compositional Abstractions of Stochastic Systems

Authors : Abolfazl Lavaei, Sadegh Soudjani, Majid Zamani

Published in:

Publisher:

## Abstract

In this paper, we propose a compositional approach for constructing abstractions of general Markov decision processes (gMDPs) using approximate probabilistic relations. The abstraction framework is based on the notion of $$\delta$$-lifted relations, using which one can quantify the distance in probability between the interconnected gMDPs and that of their abstractions. This new approximate relation unifies compositionality results in the literature by allowing abstract models to have either finite or infinite state spaces. To this end, we first propose our compositionality results using the new approximate probabilistic relation which is based on lifting. We then focus on a class of stochastic nonlinear dynamical systems and construct their abstractions using both model order reduction and space discretization in a unified framework. Finally, we demonstrate the effectiveness of the proposed results by considering a network of four nonlinear dynamical subsystems (together 12 dimensions) and constructing finite abstractions from their reduced-order versions (together 4 dimensions) in a unified compositional framework.
Literature
1.
Abate, A.: Approximation metrics based on probabilistic bisimulations for general state-space Markov processes: a survey. Electron. Notes Theor. Comput. Sci. 297, 3–25 (2013) CrossRef
2.
Abate, A., Prandini, M., Lygeros, J., Sastry, S.: Probabilistic reachability and safety for controlled discrete-time stochastic hybrid systems. Automatica 44(11), 2724–2734 (2008)
3.
Abate, A., Kwiatkowska, M., Norman, G., Parker, D.: Probabilistic model checking of labelled Markov processes via finite approximate bisimulations. In: van Breugel, F., Kashefi, E., Palamidessi, C., Rutten, J. (eds.) Horizons of the Mind. A Tribute to Prakash Panangaden. LNCS, vol. 8464, pp. 40–58. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-06880-0_2 CrossRef
4.
Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, Cambridge (2008) MATH
5.
Desharnais, J., Gupta, V., Jagadeesan, R., Panangaden, P.: Metrics for labelled Markov processes. Theor. Comput. Sci. 318(3), 323–354 (2004)
6.
Desharnais, J., Laviolette, F., Tracol, M.: Approximate analysis of probabilistic processes: logic, simulation and games. In: Proceedings of the 5th International Conference on Quantitative Evaluation of System, pp. 264–273 (2008)
7.
D’Innocenzo, A., Abate, A., Katoen, J.: Robust PCTL model checking. In: Proceedings of the 15th ACM international conference on Hybrid Systems: Computation and Control, pp. 275–286 (2012)
8.
Haesaert, S., Soudjani, S., Abate, A.: Verification of general Markov decision processes by approximate similarity relations and policy refinement. SIAM J. Control Optim. 55(4), 2333–2367 (2017)
9.
Haesaert, S., Soudjani, S., Abate, A.: Temporal logic control of general Markov decision processes by approximate policy refinement. In: Proceedings of the 6th IFAC Conference on Analysis and Design of Hybrid Systems, vol. 51, pp. 73–78 (2018) CrossRef
10.
Julius, A.A., Pappas, G.J.: Approximations of stochastic hybrid systems. IEEE Trans. Autom. Control 54(6), 1193–1203 (2009)
11.
Kamgarpour, M., Summers, S., Lygeros, J.: Control design for specifications on stochastic hybrid systems. In: Proceedings of the 16th ACM International Conference on Hybrid Systems: Computation and Control, pp. 303–312 (2013)
12.
Larsen, K.G., Skou, A.: Bisimulation through probabilistic testing. Inf. Comput. 94(1), 1–28 (1991)
13.
Lavaei, A., Soudjani, S., Majumdar, R., Zamani, M.: Compositional abstractions of interconnected discrete-time stochastic control systems. In: Proceedings of the 56th IEEE Conference on Decision and Control, pp. 3551–3556 (2017)
14.
Lavaei, A., Soudjani, S., Zamani, M.: Compositional synthesis of finite abstractions for continuous-space stochastic control systems: a small-gain approach. In: Proceedings of the 6th IFAC Conference on Analysis and Design of Hybrid Systems, vol. 51, pp. 265–270 (2018) CrossRef
15.
Lavaei, A., Soudjani, S., Zamani, M.: From dissipativity theory to compositional construction of finite Markov decision processes. In: Proceedings of the 21st ACM International Conference on Hybrid Systems: Computation and Control, pp. 21–30 (2018)
16.
Lavaei, A., Soudjani, S., Zamani, M.: Compositional construction of infinite abstractions for networks of stochastic control systems. Automatica 107, 125–137 (2019)
17.
Lavaei, A., Soudjani, S., Zamani, M.: Compositional synthesis of large-scale stochastic systems: a relaxed dissipativity approach. Nonlinear Analysis: Hybrid Systems (2019, accepted)
18.
Segala, R., Lynch, N.: Probabilistic simulations for probabilistic processes. Nordic J. Comput. 2(2), 250–273 (1995)
19.
Soudjani, S., Abate, A.: Adaptive and sequential gridding procedures for the abstraction and verification of stochastic processes. SIAM J. Appl. Dyn. Syst. 12(2), 921–956 (2013)
20.
Soudjani, S., Abate, A., Majumdar, R.: Dynamic Bayesian networks as formal abstractions of structured stochastic processes. In: Proceedings of the 26th International Conference on Concurrency Theory, pp. 1–14 (2015)
21.
Soudjani, S.E.Z., Gevaerts, C., Abate, A.: FAUST $$^{\sf 2}$$: $$\underline{{\rm f}}$$ormal $$\underline{{\rm a}}$$bstractions of $$\underline{{\rm u}}$$ncountable- $$\underline{{\rm st}}$$ate $$\underline{{\rm st}}$$ochastic processes. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 272–286. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_23 CrossRef
22.
Soudjani, S.: Formal abstractions for automated verification and synthesis of stochastic systems. Ph.D. thesis, Technische Universiteit Delft, The Netherlands (2014)
23.
Tkachev, I., Abate, A.: On infinite-horizon probabilistic properties and stochastic bisimulation functions. In: Proceedings of the 50th IEEE Conference on Decision and Control and European Control Conference (CDC-ECC), pp. 526–531 (2011)
24.
Zamani, M., Mohajerin Esfahani, P., Majumdar, R., Abate, A., Lygeros, J.: Symbolic control of stochastic systems via approximately bisimilar finite abstractions. IEEE Trans. Autom. Control 59(12), 3135–3150 (2014)


text:
# How do you read "$a_n$" in English?

What is the correct way to read "$a_n$" in English? What is the translation of what in Spanish is "$a$ sub $n$"?

• My friend Rik tells the story of the time his aunt was visiting from Germany and asked him “Rik, what is the word, in English, for when you are happy because someone else is sad?”
– MJD
Jul 31, 2013 at 3:38
• When there is no possible confusion with $a^{(n)}$, I often just say a n. Jun 14, 2016 at 10:50

Believe it or not, the usual way is ‘$a$ sub $n$’.


text:
# Negative Signal to Noise Ratio

What is the reason for getting negative snr value when calculating Signal to noise ratio of speech signal using matlab function SNR()?

• i guess it would be because the noise had more power (or energy) than the signal had (assuming this negative SNR was expressed in dB). – robert bristow-johnson Sep 18 '18 at 7:50

Signal to Noise ratio (SNR) is a ratio of powers and hence it is always greater than or equal to zero, it cannot be negative.

On the other hand, very commonly SNR is expressed in decibel (dB) notation

$$\text{SNR}_{\text{dB}} = 10 \log_{10}\left( \frac{\sigma_x^2}{\sigma_n^2 } \right)$$

where $\sigma_x^2$ and $\sigma_n^2$ are the signal and noise powers respectively. In which case, a $0$ dB SNR means that the signal power is equal to the noise power. And when the signal power is less than the noise power, then one gets a negative SNR in dB...

• I hope you don't mind the removal of an l on "decibell", and bigger parentheses – Laurent Duval Sep 18 '18 at 9:08
• @LaurentDuval No of course not! But in the mean time (simultanesouly!) I was editing your post! believe it or not, and see the comment there ! – Fat32 Sep 18 '18 at 9:09
• Funny, so can we considered a 0 dB (equal power to clean noise) memory-less system? :) – Laurent Duval Sep 18 '18 at 9:11

I'll write the same equation as @Fat32 did because SNR is SNR $$\text{SNR} = 10 \log_{10}\left( \frac{\sigma_S^2}{\sigma_N^2 } \right)$$

Mathematically speaking, the SNR is negative when the log is negative. We know that $$\log x < 0$$ only if $0 < x< 1$, i.e. $$\frac{\sigma_S^2}{\sigma_N^2 } < 1$$ which means that $$\sigma_S^2 < \sigma_N^2$$ So, when the power of your speech signal is less than the power of the noise, you'd get a negative SNR.

• What could be the better ratio in db for any speech signal? Is there any to improve my negative ratio? – Deivapriya Sep 19 '18 at 6:08
• @Deivapriya do you mean to ask if methods do exist for improving the SNR ? – Ahmad Bazzi Sep 19 '18 at 13:27
• Yes, is there a way do improve the SNR? – Deivapriya Sep 20 '18 at 4:58