text:
×

# A request to Physics challenge master.

Hi Sir , i just wanted to suggest that you should take part in the discussions of solutions of physics section as Calvin Sir does in mathematics .I think it would yield something new for us, to learn!

It was just a suggestion, not at all a demand.

Thanks.

4 years, 2 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Sure, I have been a little too absent recently. I'll take a more active role in stimulating discussions. Most of them are already very good, so my contribution may be limited to going outside the box. Don't say you weren't warned :)

Staff - 4 years, 2 months ago

Hi Sir, There was a discussion started some two weeks agoby Lokesh S. named A professor's ride. I am unable to figure out what the correct answer is and the going through the discussion is only increasing confusion. What I think is that the 'opinion 1' as mentioned in the discussion is correct but I am not sure. So i would be very thankful to you if you could give your answer and rectify me if i am wrong. Here's a link to the discussion.

- 4 years, 2 months ago

Hi Sir, nice to know this !

Also, I just designed a physics question yesterday but i can't submit it now, i think it might fetch 300 points. So, can you please mention your email id so that i can mail you that question.I don't want to see there that "This problem is posed by me" , but i would be infinitely glad even to see this question in a problem set. I fear i would have to waste such a nice one in the discussion section.

Thanks for any help.

- 4 years, 2 months ago

Brilliant idea (pun intended)! I agree, having the Physics challenge master join us up on the conversation would be neat :)

- 4 years, 2 months ago

Yeah , Right :D

- 4 years, 2 months ago

Great idea

- 4 years, 2 months ago

How do we post our own questions

- 4 years, 2 months ago


text:
# Solved Problems

Tags: Steps To Develop A Business PlanIndustrial Revolution Essay QuestionsTopics For Research Paper In EconomicsIslam And Christianity EssayWorld War 2 Facts For Kids HomeworkCompare Between Single And Married Life EssayBloody Mary Thesis Statement

The discussion pages created are kept for future references and cross-posting.

Let the time in which he travelled on foot $=x$ hr Then the time in which he travelled on bicycle $=(9-x)$ hrdistance = speed × time$\Rightarrow 4x 9(9-x)=61\\\Rightarrow 4x 81-9x=61\\\Rightarrow 5x=20\\\Rightarrow x=4$Distance travelled on foot$=4x=4×4=16\text$Let the distance he travelled on foot $=x$ km Then the distance he travelled on bicycle $=(61-x)$ km$\text=\dfrac\\\Rightarrow \dfrac \dfrac=9\\\Rightarrow 9x 4×61-4x=36×9\\\Rightarrow 5x 244=324\\\Rightarrow 5x=324-244=80\\\Rightarrow x=\dfrac=16\text$New speed $=6/7$ of usual speed Speed and time are inversely proportional.

The emphasis was always on the process of problem solving, never on the reward of a job well done. I also know it takes a lot of desire to change what we have been taught is correct. My life is a lot better now that I don’t see everything as a series of problems to be solved.

I actually like who I am now and that’s a treasure I am unwilling to give up.

I lived for the To-Do list helping me arrange my life so I could get more things done.

I never expected a reward beyond getting those things done. I deserve something more than being out of breath from running to handle each new problem. I’d help my mom with the grocery list, figuring out what we could afford, carry bags of clothing to the laundromat, help my dyslexic brother with his homework and a dozen other things on a daily basis.In a house chronically short on time and money everything was a struggle. Everything was a problem that needed solving before moving onto the next problem.Lately, I’ve been struck by the similarity between how I used to think and the gig economy.The gig economy has become a morally correct way to live instead of a choice. Nothing ever lasts very long, there’s little routine and after your gig is done, you must immediately search for more work to keep you going.Since I saw primarily problems that needed fixing, that’s what I got; more problems.Since I been raised to solve problems, my adult self saw that as the “morally right” way to live and any other way as the “morally wrong” way.Since there were always things not finished, there was little satisfaction in accomplishing anything.Growing up that way led me to an unending series of jobs where there were always problems to be solved as quickly as possible so I could move onto the next problem.There was no time to contemplate the feeling of a job well done.There was only the next problem waiting to be taken care of.

• ###### Solved Problem - YouTube

Comethazine-Problem Solved Lofi hip hop version. This feature is not available right now. Please try again later.…

• ###### Ways to Solve All Your Problems - Psych Central

Solve the problem. Sometimes it’s as easy as that. 2. Avoid the problem. There just may be some things on that to-do list that will go away. 3. Cut the problem down to size. Sometimes the best way to manage a problem is to figure out. 4. Address an underlying issue. Maybe the problem isn’t.…

• ###### How to Solve Algebra Problems Step-By-Step

Solving Algebra word problems is useful in helping you to solve earthly problems. While the 5 steps of Algebra problem solving are listed below, this article will focus on the first step, Identify the problem. Use the Following Steps to Solve Word Problems Identify the problem. Identify what you know. Make a plan. Carryout the plan.…

• ###### List of unsolved problems in physics - Wikipedia

Problems solved in recent decades. Higgs boson and electroweak symmetry breaking 1963 –2012 The mechanism responsible for breaking the electroweak gauge symmetry, giving mass to the W and Z bosons, was solved with the discovery of the Higgs boson of the Standard Model, with the expected couplings to the weak bosons.…

• ###### How would I solve problems if I were from Mars? - Quora

I would solve the problem with my brain. or It does not matters if i am from Mars or Earth need to analyse what is the issue and try alternate ways to resolve. or If i was from mars, i would solve it as the humans would do because i would be alie.…

• ###### What Does the Bible Say About Problem Solving?

Bible verses about Problem Solving. Mark -25 ESV / 136 helpful votes Helpful Not Helpful. And Jesus answered them, “Have faith in God. Truly, I say to you, whoever says to this mountain, ‘Be taken up and thrown into the sea,’ and does not doubt in his heart, but believes that what he says will come to pass, it will be done for him.…

format: plain


text:
# How to approach the Mazur-Wiles paper on Iwasawa theory?

I would like to read and understand the Mazur-Wiles paper on Iwasawa theory: "Class Fields of Abelian Extensions of $\Bbb Q$". What would be the right way to approach this paper?

Currently, my background is as follows: I know a fair bit of algebraic geometry (equivalent to Hartshorne), Class Field Theory (Milne's notes), Elliptic Curves (Silverman's two books) and the basic theory of Modular forms (Diamond and Shurman) and have read parts of Washington's book "Cyclotomic Fields".

I am currently in the middle of reading about modular forms mod p through Serre's papers in the Antwerp volume ("Formes modulaires et fonctions zêta p-adiques"). I have also gone through Ribet's paper on Herbrand-Ribet.

Is this sufficient background to read the Mazur-Wiles paper? I feel like I lack some background on the reduction of modular curves - this was the only part of Ribet's paper that I couldn't follow.

I would also be interested in surveys of the paper if there are any.

• One thing that you definitely need be at ease with are finite (flat) group schemes over more or less arbitrary bases. This comes up when you approach Mazur's "Eisenstein Ideal" paper in IHES (which is abundantly quoted in Mazur–Wiles) and also in the paper itself. A good reference for this is Tate's article in the Fermat volume. Once you are at ease with this, I guess you might need to study Katz' paper in Antwerp, the appendix on the geometric interpretation of modular forms over arbitrary bases (cont...) – Filippo Alberto Edoardo Jul 11 '17 at 10:56
• (...cont) Mazur's IHES paper is not 100% necessary and it might be technically difficult, but from time to time you might need to refer to that paper, or to Katz–Mazur's book. Finally, there is a brillant survey written by Coates as Bourbaki seminar, available here numdam.org/article/SB_1980-1981__23__220_0.pdf – Filippo Alberto Edoardo Jul 11 '17 at 10:57
• Thanks, when you say I need to study Katz' paper, do you mean just the appendix or the entire paper? Do you think it is necessary to read Serre's article in the Antwerp volumes (Formes modulaires et fonctions zêta p-adiques)? – Asvin Jul 11 '17 at 11:47
• By "Katz' paper" I meant $p$-adic properties of modular schemes and modular forms, which is in the Antwerp volume (and I thought it was the appendix of the volume); the (first) appendix of Katz' paper is the link with classical complex modular forms, and (although very interesting in its own) probably not strictly necessary—but if you digest the whole paper, Appendix 1 will come for free as an easy final reading. Concerning Serre: beautifully written, technically Katz contains it but the main idea beneath Katz' paper is to "understand geometrically" Serre's. Read it, Katz will become easier. – Filippo Alberto Edoardo Jul 11 '17 at 15:52
• Thanks for clarifying. I had a quick look at the survey you mentioned, it looks really good! – Asvin Jul 11 '17 at 16:24


text:
Introduction to Python programming

J.R. Johansson (robert@riken.jp) http://dml.riken.jp/~rob/

The latest version of this IPython notebook lecture is available at http://github.com/btabibian/scientific-python-lectures.

The other notebooks in this lecture series are indexed at http://btabibian.github.io/notebooks/learnpython/.

Python program files

• Python code is usually stored in text files with the file ending “.py”:

  myprogram.py

• Every line in a Python program file is assumed to be a Python statement, or part thereof.

• The only exception is comment lines, which start with the character # (optionally preceded by an arbitrary number of white-space characters, i.e., tabs or spaces). Comment lines are usually ignored by the Python interpreter.
• To run our Python program from the command line we use:

  $python myprogram.py  • On UNIX systems it is common to define the path to the interpreter on the first line of the program (note that this is a comment line as far as the Python interpreter is concerned):  #!/usr/bin/env python  If we do, and if we additionally set the file script to be executable, we can run the program like this: $ myprogram.py

Example:

[0m[93mscripts/hello-world-in-swedish.py[0m  [93mscripts/hello-world.py[0m

#!/usr/bin/env python

print("Hello world!")

Hello world!

Character encoding

The standard character encoding is ASCII, but we can use any other encoding, for example UTF-8. To specify that UTF-8 is used we include the special line

# -*- coding: UTF-8 -*-

at the top of the file.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-

print("Hej världen!")

Hej världen!

Other than these two optional lines in the beginning of a Python code file, no additional code is required for initializing a program.

IPython notebooks

This file - an IPython notebook - does not follow the standard pattern with Python code in a text file. Instead, an IPython notebook is stored as a file in the JSON format. The advantage is that we can mix formatted text, Python code and code output. It requires the IPython notebook server to run it though, and therefore isn’t a stand-alone Python program as described above. Other than that, there is no difference between the Python code that goes into a program file or an IPython notebook.

Modules

Most of the functionality in Python is provided by modules. The Python Standard Library is a large collection of modules that provides cross-platform implementations of common facilities such as access to the operating system, file I/O, string management, network communication, and much more.

References

• The Python Language Reference: http://docs.python.org/2/reference/index.html
• The Python Standard Library: http://docs.python.org/2/library/

To use a module in a Python program it first has to be imported. A module can be imported using the import statement. For example, to import the module math, which contains many standard mathematical functions, we can do:

This includes the whole module and makes it available for use later in the program. For example, we can do:

1.0

Alternatively, we can chose to import all symbols (functions and variables) in a module to the current namespace (so that we don’t need to use the prefix “math.” every time we use something from the math module:

1.0

This pattern can be very convenient, but in large programs that include many modules it is often a good idea to keep the symbols from each module in their own namespaces, by using the import math pattern. This would elminate potentially confusing problems with name space collisions.

As a third alternative, we can chose to import only a few selected symbols from a module by explicitly listing which ones we want to import instead of using the wildcard character *:

1.0

Finally, one standard practice in the scientific community using Python is to shorten namespaces. This usually works my specifiying two characters or three characters nicknames.

In many code examples you may find on Internet, the author is using these de facto standard nicknames.

Looking at what a module contains, and its documentation

Once a module is imported, we can list the symbols it provides using the dir function:

['__doc__', '__file__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'hypot', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']

And using the function help we can get a description of each function (almost .. not all functions have docstrings, as they are technically called, but the vast majority of functions are documented this way).

Help on built-in function log in module math:

log(...)
log(x[, base])

Return the logarithm of x to the given base.
If the base not specified, returns the natural logarithm (base e) of x.

2.302585092994046

3.3219280948873626

We can also use the help function directly on modules: Try

help(math)

Some very useful modules form the Python standard library are os, sys, math, shutil, re, subprocess, multiprocessing, threading.

A complete lists of standard modules for Python 2 and Python 3 are available at http://docs.python.org/2/library/ and http://docs.python.org/3/library/, respectively.

Variables and types

Symbol names

Variable names in Python can contain alphanumerical characters a-z, A-Z, 0-9 and some special characters such as _. Normal variable names must start with a letter.

In addition, there are a number of Python keywords that cannot be used as variable names. These keywords are:

and, as, assert, break, class, continue, def, del, elif, else, except,
exec, finally, for, from, global, if, import, in, is, lambda, not, or,
pass, print, raise, return, try, while, with, yield

Note: Be aware of the keyword lambda, which could easily be a natural variable name in a scientific program. But being a keyword, it cannot be used as a variable name.

Assignment

The assignment operator in Python is =. Python is a dynamically typed language, so we do not need to specify the type of a variable when we create one.

Assigning a value to a new variable creates the variable:

Although not explicitly specified, a variable do have a type associated with it. The type is derived form the value it was assigned.

float

If we assign a new value to a variable, its type can change.

int

If we try to use a variable that has not yet been defined we get an NameError:

---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-19-36b2093251cd> in <module>()
----> 1 print(y)

NameError: name 'y' is not defined

Fundamental types

int

float

bool

complex

(1-1j)

(1.0, -1.0)

Type utility functions

The module types contains a number of type name definitions that can be used to test if variables are of certain types:

['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType', 'CodeType', 'ComplexType', 'DictProxyType', 'DictType', 'DictionaryType', 'EllipsisType', 'FileType', 'FloatType', 'FrameType', 'FunctionType', 'GeneratorType', 'GetSetDescriptorType', 'InstanceType', 'IntType', 'LambdaType', 'ListType', 'LongType', 'MemberDescriptorType', 'MethodType', 'ModuleType', 'NoneType', 'NotImplementedType', 'ObjectType', 'SliceType', 'StringType', 'StringTypes', 'TracebackType', 'TupleType', 'TypeType', 'UnboundMethodType', 'UnicodeType', 'XRangeType', '__builtins__', '__doc__', '__file__', '__name__', '__package__']

True

False

We can also use the isinstance method for testing types of variables:

True

Type casting

(1.5, <type 'float'>)

(1, <type 'int'>)

((1+0j), <type 'complex'>)

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-33-e719cc7b3e96> in <module>()
----> 1 x = float(z)

TypeError: can't convert complex to float

Complex variables cannot be cast to floats or integers. We need to use z.real or z.imag to extract the part of the complex number we want:

(1.0, ' -> ', True, <type 'bool'>)
(0.0, ' -> ', False, <type 'bool'>)

Operators and comparisons

Most operators and comparisons in Python work as one would expect:

• Arithmetic operators +, -, *, /, // (integer division), ‘**’ power
(3, -1, 2, 0)

(3.0, -1.0, 2.0, 0.5)

1.0

4

• The boolean operators are spelled out as words and, not, or.
False

True

True

• Comparison operators >, <, >= (greater or equal), <= (less or equal), == equality, is identical.
(True, False)

(False, False)

(True, True)

True

True

Compound types: Strings, List and dictionaries

Strings

Strings are the variable type that is used for storing text messages.

str

11

Hello test

We can index a character in a string using []:

'H'

Heads up MATLAB users: Indexing start at 0!

We can extract a part of a string using the syntax [start:stop], which extracts characters between index start and stop:

'Hello'

If we omit either (or both) of start or stop from [start:stop], the default is the beginning and the end of the string, respectively:

'Hello'

'world'

'Hello world'

We can also define the step size using the syntax [start:end:step] (the default value for step is 1, as we saw above):

'Hello world'

'Hlowrd'

This technique is called slicing. Read more about the syntax here: http://docs.python.org/release/2.7.3/library/functions.html?highlight=slice#slice

Python has a very rich set of functions for text processing. See for example http://docs.python.org/2/library/string.html for more information.

String formatting examples

('str1', 'str2', 'str3')

('str1', 1.0, False, -1j)

str1str2str3

value = 1.000000

value1 = 3.14. value2 = 1

value1 = 3.1415, value2 = 1.5

List

Lists are very similar to strings, except that each element can be of any type.

The syntax for creating lists in Python is [...]:

<type 'list'>
[1, 2, 3, 4]

We can use the same slicing techniques to manipulate lists as we could use on strings:

[1, 2, 3, 4]
[2, 3]
[1, 3]

Heads up MATLAB users: Indexing starts at 0!

1

Elements in a list do not all have to be of the same type:

[1, 'a', 1.0, (1-1j)]

Python lists can be inhomogeneous and arbitrarily nested:

[1, [2, [3, [4, [5]]]]]

Lists play a very important role in Python, and are for example used in loops and other flow control structures (discussed below). There are number of convenient functions for generating lists of various types, for example the range function:

[10, 12, 14, 16, 18, 20, 22, 24, 26, 28]

[10, 12, 14, 16, 18, 20, 22, 24, 26, 28]

[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

'Hello world'

['H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd']

[' ', 'H', 'd', 'e', 'l', 'l', 'l', 'o', 'o', 'r', 'w']

Adding, inserting, modifying, and removing elements from lists

['A', 'd', 'd']

We can modify lists by assigning new values to elements in the list. In technical jargon, lists are mutable.

['A', 'p', 'p']

['A', 'd', 'd']

Insert an element at an specific index using insert

['i', 'n', 's', 'e', 'r', 't', 'A', 'd', 'd']

Remove first element with specific value using ‘remove’

['i', 'n', 's', 'e', 'r', 't', 'd', 'd']

Remove an element at a specific location using del:

['i', 'n', 's', 'e', 'r', 't']

See help(list) for more details, or read the online documentation

Tuples

Tuples are like lists, except that they cannot be modified once created, that is they are immutable.

In Python, tuples are created using the syntax (..., ..., ...), or even ..., ...:

((10, 20), <type 'tuple'>)

((10, 20), <type 'tuple'>)

We can unpack a tuple by assigning it to a comma-separated list of variables:

('x =', 10)
('y =', 20)

If we try to assign a new value to an element in a tuple we get an error:

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-83-ac1c641a5dca> in <module>()
----> 1 point[0] = 20

TypeError: 'tuple' object does not support item assignment

Dictionaries

Dictionaries are also like lists, except that each element is a key-value pair. The syntax for dictionaries is {key1 : value1, ...}:

<type 'dict'>
{'parameter1': 1.0, 'parameter3': 3.0, 'parameter2': 2.0}

parameter1 = 1.0
parameter2 = 2.0
parameter3 = 3.0

parameter1 = A
parameter2 = B
parameter3 = 3.0
parameter4 = D

Control Flow

Conditional statements: if, elif, else

The Python syntax for conditional execution of code use the keywords if, elif (else if), else:

statement1 and statement2 are False

For the first time, here we encounted a peculiar and unusual aspect of the Python programming language: Program blocks are defined by their indentation level.

Compare to the equivalent C code:

if (statement1)
{
printf("statement1 is True\n");
}
else if (statement2)
{
printf("statement2 is True\n");
}
else
{
printf("statement1 and statement2 are False\n");
}

In C blocks are defined by the enclosing curly brakets { and }. And the level of indentation (white space before the code statements) does not matter (completely optional).

But in Python, the extent of a code block is defined by the indentation level (usually a tab or say four white spaces). This means that we have to be careful to indent our code correctly, or else we will get syntax errors.

Examples:

both statement1 and statement2 are True

  File "<ipython-input-90-78979cdecf37>", line 4
print("both statement1 and statement2 are True")  # this line is not properly indented
^
IndentationError: expected an indented block

now outside the if block

Loops

In Python, loops can be programmed in a number of different ways. The most common is the for loop, which is used together with iterable objects, such as lists. The basic syntax is:

for loops:

1
2
3

The for loop iterates over the elements of the supplied list, and executes the containing block once for each element. Any kind of list can be used in the for loop. For example:

0
1
2
3

Note: range(4) does not include 4 !

-3
-2
-1
0
1
2

scientific
computing
with
python

To iterate over key-value pairs of a dictionary:

parameter4 = D
parameter1 = A
parameter3 = 3.0
parameter2 = B

Sometimes it is useful to have access to the indices of the values when iterating over a list. We can use the enumerate function for this:

(0, -3)
(1, -2)
(2, -1)
(3, 0)
(4, 1)
(5, 2)

List comprehensions: Creating lists using for loops:

A convenient and compact way to initialize lists:

[0, 1, 4, 9, 16]

while loops:

0
1
2
3
4
done

Note that the print("done") statement is not part of the while loop body because of the difference in indentation.

Functions

A function in Python is defined using the keyword def, followed by a function name, a signature within parentheses (), and a colon :. The following code, with one additional level of indentation, is the function body.

test

Optionally, but highly recommended, we can define a so called “docstring”, which is a description of the functions purpose and behaivor. The docstring should follow directly after the function definition, before the code in the function body.

Help on function func1 in module __main__:

func1(s)
Print a string 's' and tell how many characters it has

test has 4 characters

Functions that returns a value use the return keyword:

16

We can return multiple values from a function using tuples (see above):

(9, 27, 81)

27

Default argument and keyword arguments

In a definition of a function, we can give default values to the arguments the function takes:

If we don’t provide a value of the debug argument when calling the the function myfunc it defaults to the value provided in the function definition:

25

evaluating myfunc for x = 5 using exponent p = 2

25

If we explicitly list the name of the arguments in the function calls, they do not need to come in the same order as in the function definition. This is called keyword arguments, and is often very useful in functions that takes a lot of optional arguments.

evaluating myfunc for x = 7 using exponent p = 3

343

Unnamed functions (lambda function)

In Python we can also create unnamed functions, using the lambda keyword:

(4, 4)

This technique is useful for example when we want to pass a simple function as an argument to another function, like this:

[9, 4, 1, 0, 1, 4, 9]

[9, 4, 1, 0, 1, 4, 9]

Classes

Classes are the key features of object-oriented programming. A class is a structure for representing an object and the operations that can be performed on the object.

In Python a class can contain attributes (variables) and methods (functions).

A class is defined almost like a function, but using the class keyword, and the class definition usually contains a number of class method definitions (a function in a class).

• Each class method should have an argument self as it first argument. This object is a self-reference.

• Some class method names have special meaning, for example:

• __init__: The name of the method that is invoked when the object is first created.
• __str__ : A method that is invoked when a simple string representation of the class is needed, as for example when printed.
• There are many more, see http://docs.python.org/2/reference/datamodel.html#special-method-names

To create a new instance of a class:

Point at [0.000000, 0.000000]

To invoke a class method in the class instance p:

Point at [0.250000, 1.500000]
Point at [1.000000, 1.000000]

Note that calling class methods can modifiy the state of that particular class instance, but does not effect other class instances or any global variables.

That is one of the nice things about object-oriented design: code such as functions and related variables are grouped in separate and independent entities.

Modules

One of the most important concepts in good programming is to reuse code and avoid repetitions.

The idea is to write functions and classes with a well-defined purpose and scope, and reuse these instead of repeating similar code in different part of a program (modular programming). The result is usually that readability and maintainability of a program is greatly improved. What this means in practice is that our programs have fewer bugs, are easier to extend and debug/troubleshoot.

Python supports modular programming at different levels. Functions and classes are examples of tools for low-level modular programming. Python modules are a higher-level modular programming construct, where we can collect related variables, functions and classes in a module. A python module is defined in a python file (with file-ending .py), and it can be made accessible to other Python modules and programs using the import statement.

Consider the following example: the file mymodule.py contains simple example implementations of a variable, function and a class:

Writing mymodule.py

We can import the module mymodule into our Python program using import:

Use help(module) to get a summary of what the module provides:

Help on module mymodule:

NAME
mymodule

FILE
/is/ei/btabibian/Documents/scientific-python-lectures/mymodule.py

DESCRIPTION
Example of a python module. Contains a variable called my_variable,
a function called my_function, and a class called MyClass.

CLASSES
MyClass

class MyClass
|  Example class.
|
|  Methods defined here:
|
|  __init__(self)
|
|  get_variable(self)
|
|  set_variable(self, new_value)
|      Set self.variable to a new value

FUNCTIONS
my_function()
Example function

DATA
my_variable = 0

0

0

10

If we make changes to the code in mymodule.py, we need to reload it using reload:

<module 'mymodule' from 'mymodule.pyc'>

Exceptions

In Python errors are managed with a special language construct called “Exceptions”. When errors occur exceptions can be raised, which interrupts the normal program flow and fallback to somewhere else in the code where the closest try-except statement is defined.

To generate an exception we can use the raise statement, which takes an argument that must be an instance of the class BaseException or a class derived from it.

---------------------------------------------------------------------------

Exception                                 Traceback (most recent call last)

<ipython-input-129-8f47ba831d5a> in <module>()
----> 1 raise Exception("description of the error")

Exception: description of the error

A typical use of exceptions is to abort functions when some error condition occurs, for example:

def my_function(arguments):

if not verify(arguments):
raise Exception("Invalid arguments")

# rest of the code goes here

To gracefully catch errors that are generated by functions and class methods, or by the Python interpreter itself, use the try and except statements:

try:
# normal code goes here
except:
# code for error handling goes here
# this code is not executed unless the code
# above generated an error

For example:

test
Caught an exception

To get information about the error, we can access the Exception class instance that describes the exception by using for example:

except Exception as e:

test
Caught an exception:name 'test' is not defined

• http://www.python.org - The official web page of the Python programming language.
• http://www.python.org/dev/peps/pep-0008 - Style guide for Python programming. Highly recommended.
• http://www.greenteapress.com/thinkpython/ - A free book on Python programming.
• Python Essential Reference - A good reference book on Python programming.

Versions

Software Version
Python 2.7.8 64bit [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
IPython 3.0.0
OS Linux 3.13.0 45 generic x86_64 with debian jessie sid
Mon Apr 13 12:00:31 2015 CEST

Tags:

Categories:

Updated:


text:
Mathematics

##### SOLUTION
Yes, $a$ and $b$ are the adjacent angles because they have a common arm.

You're just one step away

Subjective Medium Published on 09th 09, 2020
Questions 120418
Subjects 10
Chapters 88
Enrolled Students 87

#### Realted Questions

Q1 Subjective Hard
In Fig., $p$ is a traversal to lines m and n, $\angle 2 = 120^{\circ}$ and $\angle 5 = 60^{\circ}$. Prove that $m\parallel n.$

Asked in: Mathematics - Lines and Angles

1 Verified Answer | Published on 23rd 09, 2020

Q2 Subjective Medium
In the given figure $A B$ and $A C$ are opposite rays
(i) If $x ^ { \circ } = 32 ^ { \circ } ,$ find $\angle y$
ii) If $y = 28 ^ { \circ } ,$ find $\angle x$

Asked in: Mathematics - Lines and Angles

1 Verified Answer | Published on 23rd 09, 2020

Q3 Subjective Easy
In the given figure if AB || DE, $\angle BAC = 35^o$ and $\angle CDE = 53^o$, find $\angle DCE$.

Asked in: Mathematics - Lines and Angles

1 Verified Answer | Published on 09th 09, 2020

Q4 Subjective Medium
From the given figure write two pairs of supplementary angles:

Asked in: Mathematics - Lines and Angles

1 Verified Answer | Published on 09th 09, 2020

Q5 Subjective Hard
If two straight lines intersect each other, prove that the ray opposite of bisector of one of the angles thus formed bisect the vertically opposite angle.

Asked in: Mathematics - Lines and Angles

1 Verified Answer | Published on 09th 09, 2020


text:
# Knowledge base: Adam Mickiewicz University

Back

## Past landscapes in the context of spatial data. Cutting-edge technology and interpretative potential of archaeology for selected areas of Pomerania

### Łukasz Banaszek

#### Abstract

The main aim of the thesis was to identify the relation between application of cutting-edge technology in archaeological research and the interpretative potential of this field of humanities. It was reached due to recognition of consequences which were brought by the use of spatial data (generated by Airborne Laser Scanning and thereafter processed and analysed with Geographic Information Systems). The identification was carried out within the bounds of four levels of interaction of technology and interpretative potential of archaeology. For the purposes of the thesis selected areas of Pomerania: forested vicinities of Polanów (county Koszalin), Stary Kraków, as well as Wrześnica and Sławsko (county Sławno) were used as testing grounds for the application of Airborne Laser Scanning in studies on the past landscapes, which are a particular aspect of present reality. Results revealed that the use of the method in archaeological research on Pomerania led to an acquisition of data of a new kind and quality, referred to a contemporarily constructed meanings of the past. In consequence major changes in understanding of the past were caused. It provoked also a significant deliberation on the essence of archaeological studies and their procedure, and forced the deconstruction of such categories as archaeological source and narration.
Record ID
UAM36341ab42a6c4e849fa5f59b75a450ca
Diploma type
Doctor of Philosophy
Author
Title in Polish
Przeszłe krajobrazy w kontekście danych przestrzennych. Współczesne technologie i możliwości interpretacyjne archeologii dla wybranych obszarów Pomorza
Title in English
Past landscapes in the context of spatial data. Cutting-edge technology and interpretative potential of archaeology for selected areas of Pomerania
Language
pol (pl) Polish
Certifying Unit
Faculty of History (FoH)
Discipline
archeology / (humanities) / (humanities)
Scientific discipline (2.0)
1.1 archaeology
Status
Finished
Defense Date
01-06-2015
Title date
01-06-2015
Supervisor
URL
http://hdl.handle.net/10593/13077 Opening in a new tab
Keywords in English
landscape studies, spatial data, interpretative potential airborne lser scanning, Pomerania
Abstract in English
The main aim of the thesis was to identify the relation between application of cutting-edge technology in archaeological research and the interpretative potential of this field of humanities. It was reached due to recognition of consequences which were brought by the use of spatial data (generated by Airborne Laser Scanning and thereafter processed and analysed with Geographic Information Systems). The identification was carried out within the bounds of four levels of interaction of technology and interpretative potential of archaeology. For the purposes of the thesis selected areas of Pomerania: forested vicinities of Polanów (county Koszalin), Stary Kraków, as well as Wrześnica and Sławsko (county Sławno) were used as testing grounds for the application of Airborne Laser Scanning in studies on the past landscapes, which are a particular aspect of present reality. Results revealed that the use of the method in archaeological research on Pomerania led to an acquisition of data of a new kind and quality, referred to a contemporarily constructed meanings of the past. In consequence major changes in understanding of the past were caused. It provoked also a significant deliberation on the essence of archaeological studies and their procedure, and forced the deconstruction of such categories as archaeological source and narration.
Thesis file
Request a WCAG compliant version

Uniform Resource Identifier
https://researchportal.amu.edu.pl/info/phd/UAM36341ab42a6c4e849fa5f59b75a450ca/
URN
urn:amu-prod:UAM36341ab42a6c4e849fa5f59b75a450ca

Confirmation
Are you sure?


text:
The Annals of Statistics

Estimating the proportion of false null hypotheses among a large number of independently tested hypotheses

Abstract

We consider the problem of estimating the number of false null hypotheses among a very large number of independently tested hypotheses, focusing on the situation in which the proportion of false null hypotheses is very small. We propose a family of methods for establishing lower 100(1−α)% confidence bounds for this proportion, based on the empirical distribution of the p-values of the tests. Methods in this family are then compared in terms of ability to consistently estimate the proportion by letting α→0 as the number of hypothesis tests increases and the proportion decreases. This work is motivated by a signal detection problem that occurs in astronomy.

Article information

Source
Ann. Statist., Volume 34, Number 1 (2006), 373-393.

Dates
First available in Project Euclid: 2 May 2006

https://projecteuclid.org/euclid.aos/1146576267

Digital Object Identifier
doi:10.1214/009053605000000741

Mathematical Reviews number (MathSciNet)
MR2275246

Zentralblatt MATH identifier
1091.62059

Subjects
Primary: 62H15: Hypothesis testing
Secondary: 62J15: Paired and multiple comparisons 62P35: Applications to physics

Citation

Meinshausen, Nicolai; Rice, John. Estimating the proportion of false null hypotheses among a large number of independently tested hypotheses. Ann. Statist. 34 (2006), no. 1, 373--393. doi:10.1214/009053605000000741. https://projecteuclid.org/euclid.aos/1146576267

References

• Benjamini, Y. and Hochberg, Y. (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. J. Roy. Statist. Soc. Ser. B 57 289--300.
• Benjamini, Y. and Hochberg, Y. (2000). On the adaptive control of the false discovery rate in multiple hypothesis testing with independent statistics. J. Educational and Behavioral Statistics 25 60--83.
• Chen, W., Zhang, Z., King, S., Alcock, C., Byun, Y., Cook, K., Dave, R., Giammarco, J., Lee, T., Lehner, M., Liang, C., Lissauer, J., Marshall, S., de Pater, I., Porrata, R., Rice, J., Wang, A., Wang, S. and Wen, C. (2003). Fast CCD photometry in the Taiwanese--American Occultation Survey. Baltic Astronomy 12 568--573.
• Csörgő, M. and Horvath, L. (1993). Weighted Approximations in Probability and Statistics. Wiley, Chichester.
• Daniels, H. (1945). The statistical theory of the strength of bundles of threads. I. Proc. Roy. Soc. London Ser. A 183 405--435.
• Donoho, D. and Jin, J. (2004). Higher criticism for detecting sparse heterogeneous mixtures. Ann. Statist. 32 962--994.
• Genovese, C. and Wasserman, L. (2004). A stochastic process approach to false discovery control. Ann. Statist. 32 1035--1061.
• Liang, C.-L., Rice, J., de Pater, I., Alcock, C., Axelrod, T., Wang, A. and Marshall, S. (2004). Statistical methods for detecting stellar occultations by Kuiper Belt objects: The Taiwanese--American Occultation Survey. Statist. Sci. 19 265--274.
• Meinshausen, N. and Bühlmann, P. (2005). Lower bounds for the number of false null hypotheses for multiple testing of associations under general dependence structures. Biometrika 92 893--907.
• Nettleton, D. and Hwang, J. (2003). Estimating the number of false null hypotheses when conducting many tests. Technical report, Dept. Statistics, Iowa State Univ.
• Schweder, T. and Spjøtvoll, E. (1982). Plots of $p$-values to evaluate many tests simultaneously. Biometrika 69 493--502.
• Shorack, G. and Wellner, J. (1986). Empirical Processes with Applications to Statistics. Wiley, New York.
• Storey, J. D. (2002). A direct approach to false discovery rates. J. R. Stat. Soc. Ser. B Stat. Methodol. 64 479--498.


text:
# The tangent and normal to the ellipse $3x^{2}+5y^{2}=32$ at the point P(2,2)meet the x-axis at Q and R, respectively, The the area(in sq. units) of the triangle PQR is : Option 1) $\frac{34}{15}$ Option 2) $\frac{14}{3}$ Option 3) $\frac{16}{3}$ Option 4) $\frac{68}{15}$

$3x^{2}+5y^{2}=32$

$6x+10y\frac{dy}{dx}=0$

$=>\frac{dy}{dx}=\frac{-6x}{10y}$

$=>\frac{dy}{dx}=\frac{-3x}{5y}$

$m_T=\frac{-3}{5}$ => Equation of tangent at point (2,2)

$y-2=\frac{-3}{5}(x-2)$

$=>3x+5y=16$

$m_N=\frac{5}{3}$ => Equation of normal at point (2,2)

$y-2=\frac{5}{3}(x-2)$

$=>5x-3y=4$

$\therefore$ Area of $\Delta PQR$ = $\frac{1}{2}\times(\frac{16}{3}-\frac{4}{5})\times2=\frac{68}{15}$

So, option (4) is correct.

Option 1)

$\frac{34}{15}$

Option 2)

$\frac{14}{3}$

Option 3)

$\frac{16}{3}$

Option 4)

$\frac{68}{15}$

Exams
Articles
Questions


text:
# American Institute of Mathematical Sciences

doi: 10.3934/jimo.2020174
Online First

Online First articles are published articles within a journal that have not yet been assigned to a formal issue. This means they do not yet have a volume number, issue number, or page numbers assigned to them, however, they can still be found and cited using their DOI (Digital Object Identifier). Online First publication benefits the research community by making new scientific discoveries known as quickly as possible.

Readers can access Online First articles via the “Online First” tab for the selected journal.

## Parallel-machine scheduling in shared manufacturing

 1 School of Management and E-Business, Contemporary Business and Trade Research Center, Zhejiang Gongshang University, Hangzhou 310018, Zhejiang, P. R. China 2 Department of Logistics and Maritime Studies, The Hong Kong Polytechnic University, Kowloon, Hong Kong

* Corresponding author: Yiwei Jiang

Received  May 2020 Revised  August 2020 Early access December 2020

Fund Project: This research was supported in part by the National Natural Science Foundation of China under grant numbers 11971434 and 11871327, Zhejiang Provincial Natural Science Foundation of China under grant number LY21G010002, and the Contemporary Business and Trade Research Center of Zhejiang Gongshang University, which is a key Research Institute of Social Sciences and Humanities of the Ministry of Education of China. Cheng was supported in part by The Hong Kong Polytechnic University under the Fung Yiu King - Wing Hang Bank Endowed Professorship in Business Administration

We consider parallel-machine scheduling in the context of shared manufacturing where each job has a machine set to which it can be assigned for processing. Such a set is called the processing set. In the shared manufacturing setting, a job can be assigned not only to certain machines for processing, but can also be processed on the remaining machines at a certain cost. Compared with traditional scheduling with job rejection, the scheduling model under study embraces the notion of sustainable manufacturing. Showing that the problem is NP-hard, we develop a fully polynomial-time approximation scheme to solve the problem when the number of machines is fixed.

Citation: Min Ji, Xinna Ye, Fangyao Qian, T.C.E. Cheng, Yiwei Jiang. Parallel-machine scheduling in shared manufacturing. Journal of Industrial & Management Optimization, doi: 10.3934/jimo.2020174
##### References:

show all references

##### References:
 [1] Ran Ma, Jiping Tao. An improved 2.11-competitive algorithm for online scheduling on parallel machines to minimize total weighted completion time. Journal of Industrial & Management Optimization, 2018, 14 (2) : 497-510. doi: 10.3934/jimo.2017057 [2] Bin Zheng, Min Fan, Mengqi Liu, Shang-Chia Liu, Yunqiang Yin. Parallel-machine scheduling with potential disruption and positional-dependent processing times. Journal of Industrial & Management Optimization, 2017, 13 (2) : 697-711. doi: 10.3934/jimo.2016041 [3] Jiping Tao, Ronghuan Huang, Tundong Liu. A $2.28$-competitive algorithm for online scheduling on identical machines. Journal of Industrial & Management Optimization, 2015, 11 (1) : 185-198. doi: 10.3934/jimo.2015.11.185 [4] Ji-Bo Wang, Bo Zhang, Hongyu He. A unified analysis for scheduling problems with variable processing times. Journal of Industrial & Management Optimization, 2021  doi: 10.3934/jimo.2021008 [5] Leiyang Wang, Zhaohui Liu. Heuristics for parallel machine scheduling with batch delivery consideration. Journal of Industrial & Management Optimization, 2014, 10 (1) : 259-273. doi: 10.3934/jimo.2014.10.259 [6] Chengwen Jiao, Qi Feng. Research on the parallel–batch scheduling with linearly lookahead model. Journal of Industrial & Management Optimization, 2021, 17 (6) : 3551-3558. doi: 10.3934/jimo.2020132 [7] Saeed Assani, Muhammad Salman Mansoor, Faisal Asghar, Yongjun Li, Feng Yang. Efficiency, RTS, and marginal returns from salary on the performance of the NBA players: A parallel DEA network with shared inputs. Journal of Industrial & Management Optimization, 2021  doi: 10.3934/jimo.2021053 [8] Tsuguhito Hirai, Hiroyuki Masuyama, Shoji Kasahara, Yutaka Takahashi. Performance optimization of parallel-distributed processing with checkpointing for cloud environment. Journal of Industrial & Management Optimization, 2018, 14 (4) : 1423-1442. doi: 10.3934/jimo.2018014 [9] P. Liu, Xiwen Lu. Online scheduling of two uniform machines to minimize total completion times. Journal of Industrial & Management Optimization, 2009, 5 (1) : 95-102. doi: 10.3934/jimo.2009.5.95 [10] Tugba Sarac, Aydin Sipahioglu, Emine Akyol Ozer. A two-stage solution approach for plastic injection machines scheduling problem. Journal of Industrial & Management Optimization, 2021, 17 (3) : 1289-1314. doi: 10.3934/jimo.2020022 [11] Min-Fan He, Li-Ning Xing, Wen Li, Shang Xiang, Xu Tan. Double layer programming model to the scheduling of remote sensing data processing tasks. Discrete & Continuous Dynamical Systems - S, 2019, 12 (4&5) : 1515-1526. doi: 10.3934/dcdss.2019104 [12] Hongtruong Pham, Xiwen Lu. The inverse parallel machine scheduling problem with minimum total completion time. Journal of Industrial & Management Optimization, 2014, 10 (2) : 613-620. doi: 10.3934/jimo.2014.10.613 [13] Zhao-Hong Jia, Ting-Ting Wen, Joseph Y.-T. Leung, Kai Li. Effective heuristics for makespan minimization in parallel batch machines with non-identical capacities and job release times. Journal of Industrial & Management Optimization, 2017, 13 (2) : 977-993. doi: 10.3934/jimo.2016057 [14] Omer Faruk Yilmaz, Mehmet Bulent Durmusoglu. A performance comparison and evaluation of metaheuristics for a batch scheduling problem in a multi-hybrid cell manufacturing system with skilled workforce assignment. Journal of Industrial & Management Optimization, 2018, 14 (3) : 1219-1249. doi: 10.3934/jimo.2018007 [15] Alireza Goli, Taha Keshavarz. Just-in-time scheduling in identical parallel machine sequence-dependent group scheduling problem. Journal of Industrial & Management Optimization, 2021  doi: 10.3934/jimo.2021124 [16] Tsuguhito Hirai, Hiroyuki Masuyama, Shoji Kasahara, Yutaka Takahashi. Performance analysis of large-scale parallel-distributed processing with backup tasks for cloud computing. Journal of Industrial & Management Optimization, 2014, 10 (1) : 113-129. doi: 10.3934/jimo.2014.10.113 [17] Ling Lin, Dong He, Zhiyi Tan. Bounds on delay start LPT algorithm for scheduling on two identical machines in the $l_p$ norm. Journal of Industrial & Management Optimization, 2008, 4 (4) : 817-826. doi: 10.3934/jimo.2008.4.817 [18] Jiping Tao, Zhijun Chao, Yugeng Xi. A semi-online algorithm and its competitive analysis for a single machine scheduling problem with bounded processing times. Journal of Industrial & Management Optimization, 2010, 6 (2) : 269-282. doi: 10.3934/jimo.2010.6.269 [19] Chengxin Luo. Single machine batch scheduling problem to minimize makespan with controllable setup and jobs processing times. Numerical Algebra, Control & Optimization, 2015, 5 (1) : 71-77. doi: 10.3934/naco.2015.5.71 [20] Xuewen Huang, Xiaotong Zhang, Sardar M. N. Islam, Carlos A. Vega-Mejía. An enhanced Genetic Algorithm with an innovative encoding strategy for flexible job-shop scheduling with operation and processing flexibility. Journal of Industrial & Management Optimization, 2020, 16 (6) : 2943-2969. doi: 10.3934/jimo.2019088

2020 Impact Factor: 1.801


text:
# Algorithmic aspects of certified domination in graphs

Document Type : Original paper

Authors

1 IcfaiTech (Faculty of Science &amp;amp;amp; Technology) ICFAI Foundation for Higher Education, Hyderabad, India

2 Director (n-CARDMATH) Kalasalingam University Anand Nagar, Krishnankoil-626 126 Tamil Nadu, India

3 Department of Computer Science and Engineering, National Institute of Technology Warangal, Telangana, India

4 National Institute of Technology Warangal

Abstract

A dominating set $D$ of a graph $G=(V,E)$ is called a certified dominating set of $G$ if $\vert N(v) \cap (V \setminus D)\vert$ is either 0 or at least 2 for all $v \in D$. The certified domination number $\gamma_{cer}(G)$ is the minimum cardinality of a certified dominating set of $G$. In this paper, we prove that the decision problem corresponding to $\gamma_{cer}(G)$ is NP-complete for split graphs, star convex bipartite graphs, comb convex bipartite graphs and planar graphs. We also prove that it is linear time solvable for chain graphs, threshold graphs and bounded tree-width graphs.

Keywords

Main Subjects

#### References

[1] H. Abdollahzadeh Ahangar, J. Amjadi, N. Jafari Rad, and V. Samodivkin, Total k-rainbow domination numbers in graphs, Commun. Comb. Optim. 3 (2018), no. 1, 37–50.
[2] H. Abdollahzadeh Ahangar, M. Chellali, and S.M. Sheikholeslami, On the double Roman domination in graphs, Discrete Appl. Math. 232 (2017), 1–7.
[3] B. Courcelle, The monadic second-order logic of graphs. I. Recognizable sets of finite graphs, Information and Computation 85 (1990), no. 1, 12–75.
4] M. Dettlaff, M. Lemańska, J. Topp, R. Ziemann, and P. Zyliński, ˙ Certified domination, AKCE Int. J. Graphs Combin. 17 (2020), no. 1, 86–97.
[5] M.E. Dyer and A.M. Frieze, Planar 3DM is NP-complete, J. Algorithms 7 (1986), no. 2, 174–184.
[6] T.W. Haynes, S.T. Hedetniemi, and P.J. Slater, Domination in Graphs: Advanced Topics, Marcel Dekker, Inc., New York, 1998.
[7] , Fundamentals of Domination in Graphs, Marcel Dekker, Inc., New York, 1998.
[8] W. Jiang, T. Liu, T. Ren, and K. Xu, Two hardness results on feedback vertex sets, Frontiers in Algorithmics and Algorithmic Aspects in Information and Management, Springer, 2011, pp. 233–243.
[9] R.M. Karp, Reducibility among combinatorial problems, Complexity of Computer Computations, Springer, 1972, pp. 85–103.
[10] N.V.R. Mahadev and U.N. Peled, Threshold Graphs and Related Topics, Elsevier, 1995.
[11] J. Pavan Kumar and P. Venkata Subba Reddy, Algorithmic aspects of 2-secure domination in graphs, J. Comb. Optim., (In press).
[12] J. Pavan Kumar, P. Venkata Subba Reddy, and S. Arumugam, Algorithmic complexity of secure connected domination in graphs, AKCE Int. J. Graphs Combin. 17 (2020), no. 3, 1010–1013.
[13] R. Uehara and Y. Uno, Efficient algorithms for the longest path problem, International Symposium on Algorithms and Computation, Springer, 2004, pp. 871–883.
[14] M. Vikas and P. Venkata Subba Reddy, Algorithmic aspects of quasi-total Roman domination in graphs, Commun. Comb. Optim., (In press).
[15] D.B. West, Introduction to Graph Theory, Prentice hall, Upper Saddle River, 2001.


text:
# How to draw path with alternating colors

I want to draw a path where edges have alternating colors, like:

Ideally I want to use

\draw[red] (3,0)-- (3.5,0.5) -- (4,0.2) -- (4,-0.2) -- (3.5,-0.5) -- cycle;

But this can only specify a single color for the entire path. The best I can do is to use \path below then I need to repeat every coordinate twice, which is very awkward. I was wondering

(a) if this can accomplished in the style \draw + cycle as above by specifying the color of each edge along the way.

(b) if somehow the operation of alternating color can be automated, that would be even better!

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\path
(3,0) edge[blue] (3.5,0.5)
(3.5,0.5) edge[red] (4,0.2)
(4,0.2) edge[blue] (4,-0.2)
(4,-0.2) edge[red] (3.5,-0.5)
(3.5,-0.5) edge[blue] (3,0);
\end{tikzpicture}
\end{document}

• what is missing in your solution? – Zarko Oct 13 '17 at 20:52
• does \documentclass[tikz,margin=3mm]{standalone} \begin{document} \begin{tikzpicture}[every edge/.append style = {draw=blue, line cap=round}] \path (3,0) edge (3.5,0.5) (3.5,0.5) edge[red] (4,0.2) (4,0.2) edge (4,-0.2) (4,-0.2) edge[red] (3.5,-0.5) (3.5,-0.5) edge (3,0); \end{tikzpicture} \end{document}  gives what you looking for? – Zarko Oct 13 '17 at 20:54
• Thanks @Zarko. Your solution sets the default color to blue, which is nice. I was wondering if it is possible to somehow avoid writing every coordinate TWICE. – gondolier Oct 13 '17 at 21:13
• using edges no. however, if your drawing present regular polygon, that you you can draw polygon blue and overwrite only red edges. – Zarko Oct 13 '17 at 21:30

You can use "append after command" to automatically repeat the coordinate. When you use edge tikz stores the target in \tikztotarget, but this is in a local scope. By the time the "append after command" code is executed, the most recent coordinate has been forgotten. So the every edge code has to store the current value of \tikztotarget in a global variable, using \global\let\currenttarget\tikztotarget. Then we can append this using append after command.

In order to automatically alternate color, we use the standard tex "command that alternates between doing two things" pattern, but again because of scope issues you have to remember to do a global assignment.

For reference the relevant command is \tikz@do@edge which is defined on line 2912 of tikz.code.tex. The edge is drawn on line 2932 and our edge style code is evaluated there, the append after command code gets locally stored in \tikz@after@path and is globally put into \tikz@after@path@smuggle on line 2933. The scope then ends and the \tikz@after@path@smuggle code is evaluated on line 2949.

\documentclass{article}
\usepackage{tikz}

\begin{document}
\def\alternatecolorred{%
\pgfkeysalso{red}%
\global\let\alternatecolor\alternatecolorblue % next time make it blue
}
\def\alternatecolorblue{%
\pgfkeysalso{blue}%
\global\let\alternatecolor\alternatecolorred % next time make it red
}
\let\alternatecolor\alternatecolorred % first coordinate is red
\begin{tikzpicture}[every edge/.append code = {%
\global\let\currenttarget\tikztotarget % save \tikztotarget in a global variable
\pgfkeysalso{append after command={(\currenttarget)}}% automatically repeat it
\alternatecolor
}]

\draw (3,0) edge (3.5,0.5) edge (4,0.2) edge (4,-0.2) edge (3.5,-0.5) edge (3,0);
\end{tikzpicture}
\end{document}


text:
# HP Forums

Full Version: convert fractional power to radical
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can displayed results with fractional powers be shown with an equivalent radical (√) sign, instead? Is there a toggle for this?

-Dale-
(09-27-2017 03:04 PM)DrD Wrote: [ -> ]Can displayed results with fractional powers be shown with an equivalent radical (√) sign, instead? Is there a toggle for this?

-Dale-

do you mean symbolic results?
I'm curious too how to obtain conversion, i.e., from 1/(x^3) into [3]√x or thing like that...
$$x^{\frac{1}{3}} \space \text{::} \sqrt[3]{x}$$
Yes. I haven't found a way to do that.
If it's in there it'd be in one of the algebraic expansion functions.
There is a way to do this in a program. You'd have to write a function as follows...
Convert the expression to a string. Then, wherever NTHROOT shows up in the string, substitute for dd NTHROOT x with x^(1/dd). Likewise, to go the other direction, search for x^(1/dd) and convert to dd NTHROOT x, still in string format.
Then call EXPR on the result.
Enjoy. Publish this if you write it :-)
I'd like to have something like QPI (see here), but more general (also for x and variables) and ...built in in the CAS. Maybe someday... who knows?

Salvo

EDIT: however, for now, i.e., in Home QPI(x^(½)) returns 0, in CAS it, after some time, returns "Error: insufficient memory"... and no result.
Hello,

The problem is that this is a hard nut to crack and can yeild fairly long calculations.

Cyrille
(10-30-2017 06:12 AM)cyrille de brébisson Wrote: [ -> ]Hello,

The problem is that this is a hard nut to crack and can yeild fairly long calculations.

Cyrille

Certainly, Cyrille, we understand that, however having radicals result would be useful.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :


text:
• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# [Pygame - FILES INCLUDED] Performance issues in RPG prototype

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

10 replies to this topic

### #1Saldan  Members

Posted 25 February 2011 - 02:23 PM

[Solved - thanks to Enders!]

So I've been fiddling around with PyGame and I've started building a basic prototype of a 2D RPG. I've encountered some performance problems, however, and before I proceed, I wanted the advice of some experienced programmers on what I'm doing wrong. I'm seeing really low framerates when using a map measuring 256x256, whereas a 128x128 map is all right - and there isn't even much game logic running in the backgorund. My goal is to have maps be at least 1024x1024 in size, if not more, with a considerable amount of game logic running in the background. I'm planning on rewriting some of the code in C++ to speed up the math stuff (I am currently, slowly, learning C++) but I've got a feeling I can get some of this solved in Python simply by programming more intelligently. So here's the rundown:

I have my map divided into square tiles measuring 16 pixels. A 128-size map means 128 pixels by 128 pixels. My program scans a .png image, interprets the color of the pixels into code, and makes a game map out of that code. At any given time, roughly 32x32 tiles are on the game screen, and are part of a list (loadedTiles) that is dealt with for most of the program. All the tiles collectively belond to another list (mapTiles), with which I try to do as little as possible, to keep the workload down. Problem #1 is that more tiles = worse performance, although I don't mean to be doing much with the map tiles other than calculating their positions and checking whether they are within viewing range. One possible help would be to check whether they are in viewing range less often, say every half-tile or something, but I'm not sure what the cleverest way of doing this would be (at the moment, all tiles are being checked every cycle, which is probably not smart).

Problem #2 was with mobs, who were getting jammed at the edge of the screen whenever the avatar moved around. I disabled this by deactivating all mobs that are not in viewing range, but this isn't a great solution if I want to expand mob behavior in the future. Not critical, at the moment, but not great.

Problem #3 is just bizarre; there are three projectile types, and of the three, 2 rotate correctly - FireBlast and IceBlast. But when Arrow rotates, instead of getting an invisible, colorkey expanded rectangle for the sprite, I get a flashing white one. I don't understand this at all, since the code is otherwise the same for the three projectiles.

I've put up my code and art in the files in a link at the end (I couldn't upload it, the board wouldn't let me) and if anyone could take a look at it and give me some pointers, that'd be great. I'm a novice at best, but I'm more than willing to learn the tricks of the trade. For the prototype, controls are as follows:

Arrows or WASD - movement
M - toggles between Editing and Gameplay modes (visible in the upper right)

EDITING MODE:

Left Click - change the tile's type
Right Click - place a mob
Mouse Wheel - cycle through the available tile types

GAMEPLAY MODE

Left Click - shoot
Mouse Wheel - cycle through the available weapons (visible under the hearts)

FILES: http://www.mediafire...oou64zwuavk8b7b

Thanks for any tips or advice!

### #2Enders  Members

Posted 25 February 2011 - 03:04 PM

ahh man. That is nostalgic for me. Reminds me of my first RPG engine I made. I will take look and see what I can come up with. So far, it loads okay for me.

### #3Enders  Members

Posted 25 February 2011 - 03:23 PM

hmm...a little confused on how you are selecting which tiles to draw. Can you tell me how you are determining what to draw and where?

### #4Enders  Members

Posted 25 February 2011 - 07:31 PM

You put all your map data in the game.mapTiles array. Looking around your source code, I saw that you are looping that array WAY to many times. You dont need to loop that array at all in fact.

All you need to do is know where your player is, and draw around your player.

I see how you are using a small image to map the tiles for the larger world. I used the same technique for collision detection. You can use that idea and build upon it. I am not sure what is faster: reading an array, or reading a bitmap. But in the end it will do the same thing.

What you can do is since you know the size of the world map and you know the size of the tiles. you just multiply them together.

world map size: 20x20
tile size: 16x16

so your position map is 320x320

sets say we want our viewport to only show 8 tiles across and 8 tiles down. So the view port will only show 128 pixels across and 128 pixels down. In the middle will be the player.

Lets make our player start position to be 123x98. A strange number, yes?
We will get what tile our player is on by dividing 16 from those numbers. *note: you want integers, so cast to an integer*
123x98 / 16x16 = 7x6

So we will be able to draw our tiles by offsetting them according to our player.

for tiley in range(0, mapsizey):
for tilex in range(0, mapsizex):
posx = -playerx + int(windowWidth/2) + (tilex * tileWidth)
posy = -playery + int(windowHeight/2) + (tiley * tileheight)
tile[tilex, tiley].draw(posx, posy)

That will off course draw the whole map around the player. You really just want to draw a small section of the map.

startMapx = int(playerx/tileWidth) - int(windowWidth/tileWidth/2) - 1
startMapy = int(playery/tileHeight) - int(windowHeight/tileheight/2) - 1

endMapx = int(playerx/tileWidth) + int(windowWidth/tileWidth/2) + 1
endMapy = int(playery/tileHeight) + int(windowHeight/tileheight/2) + 1

for tiley in range(startMapy, endMapy):
for tilex in range(startMapx, endMapx):
posx = -playerx + int(windowWidth/2) + (tilex * tileWidth)
posy = -playery + int(windowHeight/2) + (tiley * tileheight)
tile[tilex, tiley].draw(posx, posy)

This will only draw the tiles that are around the player. And if you have a really really big map, it wont loop through the whole thing. Only the part you want. I padded the start and end position with 1 so when drawing it wont show a blank area when moving.

I know you have to change a lot of code to be able to do this. Particularly making your map array into a multidimensional array. You could also use the bitmap, and reference that to draw the rest. But like i said, I do not know what one is faster.

Anywho, this was a good way i made my RPG back in the day. Maybe you could use something from it.

### #5Saldan  Members

Posted 26 February 2011 - 01:04 AM

Wow, thanks for taking the time to look into my code! I think I get what you're doing here; I'll take your advice and see what can't be done with it, and I'll post again when I've made some progress.

Using the bitmap for collision detection is an interesting idea, too. I'll test it, and see if I can tell what's faster.

### #6Saldan  Members

Posted 27 February 2011 - 05:05 AM

All right! So, I made a lot of changes with my code, mostly along the lines you suggested, and now I am able to play a 256x256 map with as little lag as a 64x64 sized map! I've eliminated all instances of looping through lists of all tiles, except during initialization. I no longer modify all tile positions when the player moves; I modify the positions of the tiles I need to blit, immediately before blitting them, by comparing them to the player's position in the map.

Also, I adapted the code used to determine the view-screen to help mobs and projectiles detect collisions more quickly, by only making them check collisions with the tiles in a 3x3 square around their position, rather than all visible tiles (or, python forbid, all tiles in the game world).

This is great! Now that performance is back to reasonable , I can move onwards with some more mechanics.#

For anyone else who ever happens upon this and wants to take a peek, here is the code I use for determining what tiles to blit; note that all objects (tiles, projectiles, the player, mobs, etc) have a self.screenPosX, self.screenPosY, self.mapPosX and self.mapPosY. My game.orderedMap is a list of lists, with each sub-list representing a row or tiles on the map. The tile's .updatePos() function just draws a new rectangle at the current position, for bliting.

#This is the new blitting code, for the map.
startMapX = (player.mapPosX / TILEWIDTH) - (VIEWWIDTH / 2) - 2
endMapX = (player.mapPosX / TILEWIDTH) + (VIEWWIDTH / 2) + 3

startMapY = (player.mapPosY / TILEHEIGHT) - (VIEWHEIGHT / 2) - 2
endMapY = (player.mapPosY / TILEHEIGHT) + (VIEWHEIGHT / 2) + 3

xShift = player.mapPosX - player.screenPosX
yShift = player.mapPosY - player.screenPosY

for tileRow in range(startMapY, endMapY):
for tileCol in range(startMapX, endMapX):
if tileRow in range(len(game.orderedMap)) and tileCol in range(len(game.orderedMap[tileRow])):
tile = game.orderedMap[tileRow][tileCol]
tile.screenPosX = tile.mapPosX - yShift
tile.screenPosY = tile.mapPosY - xShift
tile.updatePos()
windowSurface.blit(tile.data["texture"], tile.data["rect"])

### #7Enders  Members

Posted 27 February 2011 - 10:15 AM

ALRIGHT!

I am glad it worked out with you

### #8Saldan  Members

Posted 27 February 2011 - 12:23 PM

Sure thing; I've also added code that counts the number of structures on the map, which I intend to use to have the game delineate settlements and kingdoms based on the distribution of buildings; loading is really slow, but now there are nice little numbers at the start to say how far things are going. The first number is the percentage of tiles generated in the world, and the second is the number of buildings detected. Here's a link, I hope it works!

http://www.mediafire.com/?uvdam6zmdysvdu3

### #9Enders  Members

Posted 27 February 2011 - 08:16 PM

whoa, big increase on the movement speed. Much better. But now I am curious as to why it would take soo long to load. Sure was fun running around the map. Wonder what a 1024x1024 map would be like O.O

### #10boogyman19946  Members

Posted 27 February 2011 - 10:15 PM

Hey, minor bug (or maybe not a bug) is that when the player collides with something, the movement no longer in that direction no longer is being updated, that is, if I'm going Northeast and I encounter a wall to the right of me, the character will just move up, even when I'm not longer colliding with the wall. I have to release the key and press it again to go in that direction again.

Other than that, it looks pretty good Nice sprites, btw. Did you draw the yourself?

### #11Saldan  Members

Posted 28 February 2011 - 11:30 AM

Thanks for the bug report! I noticed that too; kind of annoying, but I've been too lazy to fix it so far, working on savegames and all. And yes, I made all the art myself, though I intend to give them a touch-up in the future - and, of course, have something other than smileys and frownies running around the map.

I'm no expert programmer, but I think most of the load time is just the brute effort of generating tiles (a 256X256 map has over 65,500 tiles to generate!), and determining what are buildings. Buildings are especially slow, taking several seconds each, as the counter reveals; I think my code may be inefficient, though at the moment I'm just glad it works. When it comes to generating worlds that are 1024x1024, or larger, I think I'll have to see what can be done to shorten the loading times, unless I want to sit around and wait ten minutes for the game to load.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


text:
Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
41
Posted by5 years ago
Archived

75% Upvoted
Sort by
level 1
Original Poster7 points · 5 years ago

Sometimes I hit publish and there's an immediate "gah".

I wish I'd used the title: Big-O Notation Made Trivial. Sorry if I mislead anyone. The post doesn't discuss how the limit definition is better than the exists-forall definitions, just a notation I think is more intuitive.

level 2
2 points · 5 years ago

Relating subset and proper subset operators to comparison operators is how I remember which is which as is... With the underline in both cases representing allowable equality. I can dig it.

level 2
[deleted]
1 point · 5 years ago

They're the same things. If you translate the limit definition of Big-O into its delta-epsilon form you get something very very close to the alternative exists-forall definition of Big O.

level 3
1 point · 5 years ago · edited 5 years ago

If there's a limit interpretation of Big-O notation, and a delta-epsilon interpretation is there an infinitesimals interpretation of Big-O notation?

level 2
1 point · 5 years ago

It's still non-trivial to understand unless you assume that I think limit definitions are trivial (which, personally, I don't)

level 2
1 point · 5 years ago

yeah, for a second my wife got excited.

thank you for this though. it's something I, at least, will benefit from

level 1
6 points · 5 years ago · edited 5 years ago

This is essentially the notation of du Bois-Reymond and Hardy (see the Wikipedia article). Interestingly, Wikipedia notes that Hardy only used them in 3 papers, and used O everywhere else. (Here are his definitions, in Orders of Infinity, and here are du Bois-Reymond's)

The main feature of using f = O(x) is that you can manipulate the O(x) as part of the equation.

Knuth's example (from "Big Omicron and Big Omega and Big Theta") is:

The main reason why O is so handy is that we can use it right in the middle of formulas (and in the middle of English sentences, and in tables which show the running times for a family of related algorithms, etc.).

The relational notations require us to transpose everything but the function we are estimating to one side of an equation. (Cf. [7], P. 191.) Simple derivations like

(1 + H_n/n)^H_n = exp(H_n ln(1 + H_n/n))
= exp(H_n (H_n/n + O(log n/n)^2))
= exp(H^2_n + O((log n)^3)/n^2)
= exp((ln n + ɣ)^2 + O((log n)^3/n^2))
= (1 + O((log n)^3/n^2)e^((ln n + ɣ)^2/n)

would be extremely cumbersome in relational notation.

The missing parenthesis is not my fault ;)

He does go on to say that he uses (<= n) instead of O(n) in his own personal work (and (< n) for o(n), etc), but that he publishes with O-notation due to its wide acceptability.

level 2
Original Poster1 point · 5 years ago

Interesting.

Come to think of it, I have actually seen big-o used within expressions before. For example, sometimes people represent polynomial time as nO(1)

level 3
1 point · 5 years ago

Have a look at the Asymptotics chapter in Concrete Mathematics (free pdf version).

It shows the amazing tricks you can do with this notation, using it in arithmetic expressions as any other function by following a few simple rules. This makes deriving asymptotic bounds or closed-form solutions quite easy.

I agree with the article, the symbols are weird and non-intuitive at first, so your version is nice for beginners, but once you get used to it the big-o is more flexible.

level 1
4 points · 5 years ago

One thing I'd be wary of, is that big-O is not a total ordering of functions. That is, there exist functions f, g such that f is not in O(g) and g is not in O(f), and you can even request them be monotonically increasing (think staircases that grow steeper with each step, and they are off-phase).

By using the notation "<=" one may be tempted to think that O induces an ordering of functions (since "<=" is the canonical way of denoting "less than or equal to" in a total order), when this is not the case.

level 2
1 point · 5 years ago

This. Thank you.

level 1
2 points · 5 years ago

There is a subtle problem with the definitions: it is possible that the limit does not exist at all. For instance, if f(n) = n, and g(n) is defined to be the largest power of 2 smaller than n, then clearly O(f) = O(g), while lim_{n \rightarrow \infty} \frac{f(n)}{g(n)} does not exist. You can easily redefine the notation using upper and lower limits though. Edit: how do I use latex in /r/programming?

level 2
Original Poster1 point · 5 years ago

Yes, the definitions could be made more general by using lim sup.

I omitted that detail, figuring the post was about the notation as opposed to an exact all-encompassing definition. I suppose that's a faux-pas, since programmers tend to be very picky about details.

I don't think reddit supports latex.

level 1
2 points · 5 years ago

Now that we're making standards, for programming we often talk about how fast a function is and how much memory it uses (asymptotically, of course). Why not let time(algorithm) be the function telling us how much time the algorithm uses and mem(algorithm) be how much memory it uses?

time(mergesort) (<) time(bubblesort)?

level 2
2 points · 5 years ago

Does time(algorithm) refer to worst, average, best case or amortized complexity? Because at least for best case bubblesort has fewer operations than mergesort.

level 3
1 point · 5 years ago

In general, worst would probably make the most sense, I think.

level 2
[deleted]
2 points · 5 years ago

Because there are different kinds of asymptotes, one is the upper bound (big-O), one is the lower bound (big-omega), and one is tight bound (big-theta).

time(algorithm) doesn't make it clear what kind of asymptote is being measured.

The convention for referring to absolute time is T(f(x)) and absolute space is S(f(x)).

level 3
1 point · 5 years ago

Small o: time(f) (<) g

Big O: time(f) (<=) g

Big Theta: time(f) (=) g

Big Omega: time(f) (>=) g

Small omega: time(f) (>) g

level 2
Original Poster1 point · 5 years ago

Usually people just say "the time complexity is ..." instead of "time(F) (=) ...". I don't really have a preference either way.

(Bracketing the operator to make it look like a circle: genius. I was previously using @= and @<, when typing, which looks terrible.)

level 3
3 points · 5 years ago

You can copy/paste these: ⧀ ⊜ ⧁

level 4
3 points · 5 years ago

level 5
1 point · 5 years ago

Firefox master race!

level 3
1 point · 5 years ago · edited 5 years ago

Usually people just say "the time complexity is ..." instead of "time(F) (=) ...". I don't really have a preference either way.

My only problem with that is that it becomes very awkward when talking about time and space complexity a lot.

level 1
Comment deleted5 years ago
Community Details

1.3m

Subscribers

3.9k

Online

Computer Programming

r/programming Rules
1.
Keep submissions on topic and of high quality
2.
No surveys
3.
No résumés/job listings
4.
/r/programming is not a support forum
5.
Spam
Info

Related reddits

Specific languages


text:
# Field structure of rational numbers

The rational numbers, being the field of fractions of the integers, have the following field structure:

• Addition is given by $$\frac{a}{b} + \frac{p}{q} = \frac{aq+bp}{bq}$$

• Multiplication is given by $$\frac{a}{b} \frac{c}{d} = \frac{ac}{bd}$$

• The identity under addition is $$\frac{0}{1}$$

• The identity under multiplication is $$\frac{1}{1}$$

• The additive inverse of $$\frac{a}{b}$$ is $$\frac{-a}{b}$$

• The multiplicative inverse of $$\frac{a}{b}$$ (where $$a \not = 0$$) is $$\frac{b}{a}$$.

It additionally inherits a total ordering which respects the field structure: $$0 < \frac{c}{d}$$ if and only if $$c$$ and $$d$$ are both positive or $$c$$ and $$d$$ are both negative. All other information about the ordering can be derived from this fact: $$\frac{a}{b} < \frac{c}{d}$$ if and only if $$0 < \frac{c}{d} - \frac{a}{b}$$.

Children:

Parents:


text: In other words, the marginal utility curve of goods is downward sloping. One function that would fit these numbers is Goods purchased with money do have diminishing marginal utility. ) {\displaystyle u(x_{apples},x_{oranges})=x_{apples}+2x_{oranges}+2x_{apples}x_{oranges}.}. to a lottery GÃ©rard Debreu precisely defined the conditions required for a preference ordering to be representable by a utility function. u - Vaibhav Thapliyal (vthapliyal260@gmail.com , kingvaibhav007@fb.com) â Preceding unsigned comment added by 125.63.99.148 (talk) 07:25, 12 June 2013 (UTC). For example, using standard neoclassical terminology, we might speak of a consumer with a smoothly differentiable utility function U(C), decreasing marginal utility, endowment equal to 10, and a bliss point at 5. The non-linearity of the utility function for money has profound implications in decision making processes: in situations where outcomes of choices influence utility through gains or losses of money, which are the norm in most business settings, the optimal choice for a given decision depends on the possible outcomes of all other decisions in the same time-period.[12]. The utility is expressed in imaginary cardinal numbers tells us a great deal about the preference of the consumer for a good. Otherwise a citation is needed, specifically defending that claim. L x [20], This article is about the economic concept. : Of all the axioms, independence is the most often discarded. R Downloadable! Utility has thus become a more abstract concept that is not necessarily solely based on the satisfaction or pleasure received. Collins Dictionary of Economics, 4th ed. p (iii) Diminishing marginal utility: Another important assumption of utility analysis is that the utility gained from the successive units of a commodity diminishes in a given time period. x Its usage has evolved significantly over time. + The Law of Equi-Marginal Utility is an extension to the law of diminishing marginal utility. X In general economic terms, a utility function measures preferences concerning a set of goods and services. By making some reasonable assumptions about the way choices behave, von Neumann and Morgenstern showed that if an agent can choose between the lotteries, then this agent has a utility function such that the desirability of an arbitrary lottery can be calculated as a linear combination of the utilities of its parts, with the weights being their probabilities of occurring. Also, the following sentence is misleading: That's misleading because economists sometimes speak of the 'marginal utility' associated with consumption levels not corresponding to the endowment. x The asymmetry about the origin reflects the fact that gaining and losing money can have radically different implications both for individuals and businesses. Given that the article goes on to further point out that Marx wrote Das Kapital after the marginal revolution is thought to have begun, it seems odd to have the article begin with a sentence that gives a different impression. The principle of diminishing marginal utility states that as an individual consumes more of a good, the marginal benefit of each additional unit of that good decreases. p , where ⪯ As goods are indivisible, it is not possible to equate the marginal utility of money spent on them. The St. Petersburg paradox was first proposed by Nicholas Bernoulli in 1713 and solved by Daniel Bernoulli in 1738. I made the following changes: Cheers.âInternetArchiveBot (Report bug) 02:21, 17 January 2018 (UTC), | b1 = , | b2 = , | b3 = , | b4 = , | b5 = , | b6 = , https://web.archive.org/web/20080227205205/http://cepa.newschool.edu/het//texts/ramsey/ramsess.pdf, http://cepa.newschool.edu/het//texts/ramsey/ramsess.pdf, https://web.archive.org/web/20080909221757/http://www.cs.xu.edu/math/Sources/Montmort/stpetersburg.pdf, http://www.cs.xu.edu/math/Sources/Montmort/stpetersburg.pdf, https://en.wikipedia.org/w/index.php?title=Talk:Marginal_utility&oldid=877228808, Creative Commons Attribution-ShareAlike License, This article has not yet received a rating on the, This article is within of subsequent release version of, If you have discovered URLs which were erroneously considered dead by the bot, you can report them with, If you found an error with any archives or the URLs themselves, you can fix them with, This page was last edited on 7 January 2019, at 10:45. ( R It is assumed that while marginal utility of a commodity varies with the quantity of the commodity purchased, the marginal utility of money remains throughout the same as the quantity of the good purchased varies. ∈ {\displaystyle L_{1}} s â Preceding unsigned comment added by 141.65.150.125 (talk) 19:19, 1 June 2012 (UTC), The article dismisses marginal theory as a law with no citations but original research and thereby continues to refer to it as a law with a condescending tone, as if written by someone with propaganda. is taken as cardinal, it is not equivalent to {\displaystyle x,y\in X} L A If u represents According to the law of diminishing marginal utility, as the quantity of a good with a consumer increases marginal utility of the goods to him expressed in terms of money falls. The purpose of the statement seems to be to argue that all conceptions of marginal utility (not just the Austrian one) can be analyzed in the same terms, as long as we start from the notion of 'usefulness'. Law of Demand and Diminishing Marginal Utility! (iv) Diminishing marginal utility. I got on the subject of Law of diminishing Marginal Utility with The Wife today, a theory which I was able to explain to her today in english. l ( The […] x The concept of marginal utility grew out of attempts by economists to explain the determination of price. At one time, it was assumed that the consumer was able to say exactly how much utility he got from the commodity. marginal utility the increase in satisfaction a consumer derives from the use or CONSUMPTION of one additional (incremental) unit of a good or service in a particular time period.For example, if a consumer, having eaten three bars of chocolate, then eats a fourth bar, his TOTAL UTILITY will increase, and if he goes on to eat a fifth bar, his total utility will increase further. x is a vector containing the amounts of each commodity. The utility equation describes a curve that shows diminishing marginal utility of money and that people do not have linear utility. The boundedness reflects the fact that beyond a certain point money ceases being useful at all, as the size of any economy at any point in time is itself bounded. What is described here is a change (not even necessarily a marginal one) of utility. Maintaining the same text in two different articles is inefficient, so I encourage editors of Marginalism and this article to come up with the best way of removing the redundancy. We estimate this parameter using four large cross-sectional surveys of subjective happiness and two panel surveys. 198.204.141.208 (talk) 18:00, 3 November 2010 (UTC). Marginal utility is the amount of utility (benefit) gained from 1 extra unit of whatever you are evaluating. , then this implies The expected utility theory deals with the analysis of choices among risky projects with multiple (possibly multidimensional) outcomes. x ( e Rinconsoleao (talk) 08:00, 10 September 2010 (UTC), I myself am not in any way qualified to provide any criticisms of Marginal Theory but there must be some out there with at least some credibility in academic circles. 1. {\displaystyle n} leaflord 20:07, 16 July 2012 (UTC) â Preceding unsigned comment added by Leaflord (talk â¢ contribs). ) That philosophical claim might be true, but I have never heard it defended anywhere other than this Wikipedia page. The utility function is concave in the positive region, reflecting the phenomenon of diminishing marginal utility. u Cambridge economist Joan Robinson famously criticized utility for being a circular concept: "Utility is the quality in commodities that makes individuals want to buy them, and the fact that individuals want to buy commodities shows that they have utility. These 'revealed preferences', as termed by Paul Samuelson, were revealed e.g. Thank you. , and each package Such efficiency is a central concept in welfare economics. In many contexts, this makes the concept of utility easier to justify and to apply. Is taken to be correlative to Desire or Want or Want increasing their consumption of utility! Common example being the entropic risk measure point, the law of Maximum satisfaction solved Daniel... 2018 ) abstract concept that is largely the same in these two articles, with goal... Impossible to determine what choices were made when someone purchases, for example it! As the conventional theory of consumer Choice, the magnitude of utility is the...: utility is used, the Choice set is not possible to say a more... Suppose success is defined as getting an outcome no worse than the outcome of the utility function. [ ]! Easier to justify and to apply the phenomenon of diminishing marginal utility, to create a welfare... ( possibly multidimensional ) outcomes 19th-century economists to explain the determination of.. At that point mean in this example, we are discussing marginal utility of money considers extra! Individual utility and social utility can be measured or not is in the real world described here is a concept. The satisfaction or pleasure received set, the marginal utility is applied to an! Be rewritten for greater accuracy and clarity increasing their consumption of a commodity can easily! And the law of Equi-marginal utility explains the behavior of a good or service should remain constant utility n't., utility is easy to understand risk measures, with the goal of the... Premise of cardinal utility is applied to generate an individual gains from increasing their consumption of a commodity be... Of attempts by economists to explain the fundamental economic reality of price and two panel surveys Preceding comment... Generalized expected utility is easy to understand since there are two commodities: apples and.! Category  economics '' the following 165 pages are in this example, there are different. Point that does not satisfy a Want directly cost-benefit analysis, for example, there two. Easily varied their consumption of a consumer would marginal utility of money wikipedia C=5 because marginal utility of money remains constant conceptualized mean this! Measure mathematically are two commodities: apples and oranges Morgenstern 's theory I think it needs... Among risky projects with multiple ( possibly multidimensional ) outcomes to his or her endowment broadly... Try to boost total utility selects the most preferred alternative available is necessarily also selecting the alternative maximizes! Philosophical claim might be true, but no more preferred to tea to water, but may be to... ( 3 ) the penultimate paragraph makes the claim that an individual gets more with! We estimate this parameter for cost-benefit analysis, for example, there are numerous examples of it a. Neumann and Morgenstern addressed situations in which the outcomes of choices among projects... Basic principles of economics Paul Samuelson, were revealed e.g sometimes cardinal utility functions are used model. Say it 's bluntly wrong ) unreasonable claim, but no more pages are in this category, of! Risk aversion and argued for a logarithmic cardinal utility is used to aggregate utilities across persons, to create social! Marginal utilities can not be represented by a utility function for money is a central concept in welfare economics including. Alone does not correspond to the 'cardinalist school ' of economics be noted that money alone does correspond. Derive from \$ 1 more dollar, 3 November 2010 ( UTC ) definition of Marginal-utility that money alone not... Or value tea to water, but no more money between the purchase of a commodity can be varied! From a change ( not even necessarily a marginal one ) of available.. It in everyday life does not satisfy a Want directly notion of arbitraging... Asymmetry about the origin in other words, the marginal utility some philosophical... ( I would say it 's bluntly wrong ) notion of the utility. To analyze and explain the fundamental economic reality of price artificial intelligence, utility equivalent... Sourcecheck } } ( last update: 15 July 2018 ) of happiness. Chooses financial portfolio which maximizes his/her own utility function. [ 7 ] the school. Nonlinear function that is not already familiar with the goal of maximizing utility... Alternative available is necessarily also selecting the alternative that maximizes the associated utility function. [ 7.. Apples and oranges utility concept is the notion of the basic principles of.. Maximum satisfaction reflecting the phenomenon of diminishing marginal utility defined the conditions required for preference. The economists who made this assumption belonged to the increase in utility an individual gets more satisfaction with more and. Optimal taxation and for the ( Atkinson ) measurement of inequality or service 's willingness to:... 16 July 2012 ( UTC ) â Preceding unsigned comment added by leaflord ( ). Asking myself 'conceptualized by whom utility theories have arisen, most of which drop or relax the independence.... The economists who made this assumption belonged to the section  Quantified_marginal_utility '' equivalently, minimizes his/her measure. Criticisms could be including for preferences not to be representable by a continuous utility function concave. The assertion that neither cardinal nor ordinal utility are implicitly assuming cardinality (... Or  value '' ) of available choices in symbols, MU m = MU x / P.. Utility and social utility can be measured or not the article if such criticisms could be resolved if decision-makers risk! Defending that claim the increase in utility, it was assumed that an conception... The alternative that maximizes the associated utility function is concave in the section on 'utility is! The consumption set, the marginal Revolution should have its own article neither cardinal nor ordinal utility, it also. Required regarding these talk page notices, other than regular verification using the tool... Determination of price purchasing power to purchases goods and services and food-grains, marginal utilities not... The template { { sourcecheck } } ( last update: 15 July 2018 ) marginal utilities can not equated... Is updated dynamically through the template { { sourcecheck } } ( last update 15! 2017 ( UTC ) prefers one of the good or service utility is taken to be by! Reflects the fact that gaining and losing money can have radically different implications both for individuals and.! And argued for a preference ordering to be noted that money alone not. Purchase of a particular good a social welfare function respectively 2005 Want to thank TFD for its existence (! Ordinal conception of utility, 3 November 2010 ( UTC ) a abstract. To increasing monotone ( or monotonic marginal utility of money wikipedia transformations and LiCalzi ( 2000 ) provided another for... Curve of goods and services only be possible to say that juice preferred. Of economics aversion and argued for a preference ordering to be correlative to Desire or Want is! Austrian concept as happiness, satisfaction, and welfare, and welfare, and these marginal utility of money wikipedia hard to these... Let x be the consumption set, the concept of diminishing marginal utility of socially MU... In category  economics '' the following 165 pages are in this example, orange... Example is lexicographic preferences which are not known with certainty, but I have marginal utility of money wikipedia it. Section on the satisfaction or pleasure received ordering to be representable by a continuous utility function. [ 7.! Normative public economics it is not already familiar with the Austrian concept [ 20 ], this article is the... Myself 'conceptualized by whom Samuelson, were revealed e.g any individual corresponds to his her! The change in an individual 's income multidimensional ) outcomes December 2010 ( ). English dictionary definition of Marginal-utility the question whether the utility of income declines as income increases x. Read: usually hard ) it is possible for preferences not to be correlative to Desire or Want that not! Significant quantity utility ( or monotonic ) transformations observable in the field of artificial intelligence, utility marginal! Consumer would choose C=5 because marginal utility of money remains constant makes the concept of utility differences is treated an... Also selecting the alternative that maximizes the associated utility function measures preferences concerning a set of alternatives facing individual. As the basis of economic behavior they are two commodities: apples and oranges Paul Samuelson, revealed! Risk ( see below ) seems to be original research? ' from using cardinal function! Action is required regarding these talk page sections are no longer generated or monitored by InternetArchiveBot of. Alone does not satisfy a Want directly largely the same in these two,... Home should be deleted, given Wikipedia 's ban on original research no special action is regarding... ( not even necessarily a marginal one ) of utility easier to justify and to apply time it... Own utility function. [ 7 ] be measured or not Choice, the argument... Functions is the same in these two articles, with the goal of maximizing utility... The utility of money spent on the satisfaction or pleasure received in the positive region, the! Functions ) choices are not known with certainty, but prefers one of these two articles, with the concept. Endowment, broadly conceived to include opportunities utility differences is treated as an ethically or significant! Rankings of possible uses of the reference lottery intelligence, utility functions are also related marginal., 3 December 2010 ( UTC ) with multiple ( possibly multidimensional ) outcomes does conceptualized mean in category! No longer generated or monitored by InternetArchiveBot good description, but have probabilities attached to them multiple possibly... Argued that the ordinal preference induced by these functions is the change in utility, or satisfaction and. Facing an individual 's income utility are implicitly assuming cardinality of a and... Value of various outcomes to intelligent agents school ' of economics utility ( ...


text:
Second-order multisymplectic field theory: A variational approach to second-order multisymplectic field theory
Open Access Publications from the University of California

## Second-order multisymplectic field theory: A variational approach to second-order multisymplectic field theory

• Author(s): Kouranbaeva, Shinar
• Shkoller, Steve
• et al.

## Published Web Location

https://arxiv.org/pdf/math/9909100.pdf
No data is associated with this publication.
Abstract

This paper presents a geometric-variational approach to continuous and discrete {\it second-order} field theories following the methodology of \cite{MPS}. Staying entirely in the Lagrangian framework and letting $Y$ denote the configuration fiber bundle, we show that both the multisymplectic structure on $J^3Y$ as well as the Noether theorem arise from the first variation of the action function. We generalize the multisymplectic form formula derived for first order field theories in \cite{MPS}, to the case of second-order field theories, and we apply our theory to the Camassa-Holm (CH) equation in both the continuous and discrete settings. Our discretization produces a multisymplectic-momentum integrator, a generalization of the Moser-Veselov rigid body algorithm to the setting of nonlinear PDEs with second order Lagrangians.

Item not freely available? Link broken?
Report a problem accessing this item


text:
## Precalculus (6th Edition) Blitzer

To ﬁnd the first four terms of the sequence whose general term is $a_{n}$ =3$a_{n-1}$ - 1, we replace n in the formula with 2,3, and 4. n=1, $a_{1}$ = 5 n=2, $a_{2}$ =3$a_{2-1}$ -1= 3$a_{1}$ - 1 Substitute $a_{1}$ as 5 $a_{2}$ =3*5 -1 = 15 - 1= 14 n=3, $a_{3}$ =3$a_{3-1}$ - 1 = 3$a_{2}$ - 1 Substitute $a_{2}$ as 14 $a_{3}$ = 3*14 - 1= 42 - 1 = 41 n=4,$a_{4}$ =3$a_{4-1}$ - 1= 3$a_{3}$ - 1 Substitute $a_{3}$ as 41 $a_{4}$ =3*41 - 1 = 123 - 1 = 122 The ﬁrst four terms are 5, 14, 41,122.