text:
gemseo / algos

# parameter_space module¶

Variable space defining both deterministic and uncertain variables.

## Overview¶

The ParameterSpace class describes a set of parameters of interest which can be either deterministic or uncertain. This class inherits from DesignSpace.

## Capabilities¶

The DesignSpace.add_variable() aims to add deterministic variables from:

• a variable name,

• an optional variable size (default: 1),

• an optional variable type (default: float),

• an optional lower bound (default: - infinity),

• an optional upper bound (default: + infinity),

• an optional current value (default: None).

The add_random_variable() aims to add uncertain variables (a.k.a. random variables) from:

The ParameterSpace also provides the following methods:

Classes:

 ParameterSpace([hdf_file, copula, name]) Parameter space. RandomVariable(distribution, size, parameters) Create new instance of RandomVariable(distribution, size, parameters)
class gemseo.algos.parameter_space.ParameterSpace(hdf_file=None, copula='independent_copula', name=None)[source]

Parameter space.

uncertain_variables

The names of the uncertain variables.

Type

List(str)

distributions

The marginal probability distributions of the uncertain variables.

Type

Dict(str,Distribution)

distribution

The joint probability distribution of the uncertain variables.

Type

ComposedDistribution

Parameters
• copula (str) –

A name of copula defining the dependency between random variables.

By default it is set to independent_copula.

• hdf_file (Optional[Union[str,Path]]) –

By default it is set to None.

• name (Optional[str]) –

By default it is set to None.

Return type

None

Attributes:

Methods:

 add_random_variable(name, distribution[, size]) Add a random variable from a probability distribution. add_variable(name[, size, var_type, l_b, ...]) Add a variable to the design space. array_to_dict(x_array) Convert the current point into a dictionary indexed by the variables names. Check the state of the design space. check_membership(x_vect[, variables_names]) Check whether the variables satisfy the design space requirements. compute_samples([n_samples, as_dict]) Sample the random variables and return the realizations. dict_to_array(x_dict[, all_vars, all_var_list]) Convert an point as dictionary into an array. evaluate_cdf(value[, inverse]) Evaluate the cumulative density function (or its inverse) of each marginal. export_hdf(file_path[, append]) Export the design space to an HDF file. export_to_txt(output_file[, fields, header_char]) Export the design space to a text file. extend(other) Extend the design space with another design space. Define a new DesignSpace from the deterministic variables only. extract_uncertain_space([as_design_space]) Define a new DesignSpace from the uncertain variables only. filter(keep_variables[, copy]) Filter the design space to keep a subset of variables. filter_dim(variable, keep_dimensions) Filter the design space to keep a subset of dimensions for a variable. get(k[,d]) get_active_bounds([x_vec, tol]) Determine which bound constraints of the current point are active. get_current_x([variables_names]) Return the current point in the design space. Return the current point in the design space as a dictionary. Return the current point normalized. get_indexed_var_name(variable_name) Create the names of the components of a variable. Create the names of the components of all the variables. Return the lower bound of a variable. get_lower_bounds([variables_names]) Generate an array of the variables' lower bounds. get_pretty_table([fields]) Build a tabular view of the design space. get_range(variable) Return the numerical range of a random variable. get_size(name) Get the size of a variable. get_support(variable) Return the mathematical support of a random variable. get_tabular_view([decimals]) Return a tabular view of the parameter space. get_type(name) Return the type of a variable. Return the upper bound of a variable. get_upper_bounds([variables_names]) Generate an array of the variables' upper bounds. get_variables_indexes(variables_names) Return the indexes of a design array corresponding to the variables names. Check if the current design value is defined for all variables. import_hdf(file_path) Import a design space from an HDF file. init_from_dataset(dataset[, groups, ...]) Initialize the parameter space from a dataset. is_deterministic(variable) Check if a variable is deterministic. is_uncertain(variable) Check if a variable is uncertain. normalize_grad(g_vect) Normalize an unnormalized gradient. normalize_vect(x_vect[, minus_lb, use_dist]) Normalize a vector of the parameter space. pop(k[,d]) If key is not found, d is returned if given, otherwise KeyError is raised. as a 2-tuple; but raise KeyError if D is empty. project_into_bounds(x_c[, normalized]) Project a vector onto the bounds, using a simple coordinate wise approach. read_from_txt(input_file[, header]) Create a design space from a text file. Remove a variable from the probability space. round_vect(x_vect) Round the vector where variables are of integer type. set_current_variable(name, current_value) Set the current value of a single variable. set_current_x(current_x) Set the current point. set_lower_bound(name, lower_bound) Set the lower bound of a variable. set_upper_bound(name, upper_bound) Set the upper bound of a variable. setdefault(k[,d]) Cast the current value to complex. Convert the parameter space into a DesignSpace. transform_vect(vector) Map a point of the design space to a vector with components in $$[0,1]$$. unnormalize_grad(g_vect) Unnormalize a normalized gradient. unnormalize_vect(x_vect[, minus_lb, ...]) Unnormalize a normalized vector of the parameter space. untransform_vect(vector) Map a vector with components in $$[0,1]$$ to the design space. update([E, ]**F) If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
AVAILABLE_TYPES = [<DesignVariableType.FLOAT: 'float'>, <DesignVariableType.INTEGER: 'integer'>]
DESIGN_SPACE_GROUP = 'design_space'
FLOAT = 'float'
INTEGER = 'integer'
LB_GROUP = 'l_b'
MINIMAL_FIELDS = ['name', 'lower_bound', 'upper_bound']
NAMES_GROUP = 'names'
NAME_GROUP = 'name'
SEP = '!'
SIZE_GROUP = 'size'
TABLE_NAMES = ['name', 'lower_bound', 'value', 'upper_bound', 'type']
UB_GROUP = 'u_b'
VALUE_GROUP = 'value'
VAR_TYPE_GROUP = 'var_type'

Add a random variable from a probability distribution.

Parameters
• name (str) – The name of the random variable.

• distribution (str) – The name of a class implementing a probability distribution, e.g. ‘OTUniformDistribution’ or ‘SPDistribution’.

• size (int) –

The dimension of the random variable.

By default it is set to 1.

• **parameters (Union[int, Tuple[str, int, float], Mapping[str, Union[str, int, float]], None, float]) – The parameters of the distribution.

Return type

None

add_variable(name, size=1, var_type=DesignVariableType.FLOAT, l_b=None, u_b=None, value=None)

Add a variable to the design space.

Parameters
• name (str) – The name of the variable.

• size (int) –

The size of the variable.

By default it is set to 1.

• var_type (Union[str, Sequence[str], gemseo.algos.design_space.DesignVariableType, Sequence[gemseo.algos.design_space.DesignVariableType]]) –

Either the type of the variable or the types of its components.

By default it is set to FLOAT.

• l_b (Optional[Union[float, numpy.ndarray]]) –

The lower bound of the variable. If None, use $$-\infty$$.

By default it is set to None.

• u_b (Optional[Union[float, numpy.ndarray]]) –

The upper bound of the variable. If None, use $$+\infty$$.

By default it is set to None.

• value (Optional[Union[float, numpy.ndarray]]) –

The default value of the variable. If None, do not use a default value.

By default it is set to None.

Raises

ValueError – Either if the variable already exists or if the size is not a positive integer.

Return type

None

array_to_dict(x_array)

Convert the current point into a dictionary indexed by the variables names.

Parameters

x_array (numpy.ndarray) – The current point.

Returns

The dictionary version of the current point.

Return type

Dict[str, numpy.ndarray]

check()

Check the state of the design space.

Raises

ValueError – If the design space is empty.

Return type

None

check_membership(x_vect, variables_names=None)

Check whether the variables satisfy the design space requirements.

Parameters
• x_vect (Union[Mapping[str, numpy.ndarray], numpy.ndarray]) – The values of the variables.

• variables_names (Optional[Sequence[str]]) –

The names of the variables. If None, use the names of the variables of the design space.

By default it is set to None.

Raises

ValueError – Either if the dimension of the values vector is wrong, if the values are not specified as an array or a dictionary, if the values are outside the bounds of the variables or if the component of an integer variable is an integer.

Return type

None

clear() None.  Remove all items from D.
compute_samples(n_samples=1, as_dict=False)[source]

Sample the random variables and return the realizations.

Parameters
• n_samples (int) –

A number of samples.

By default it is set to 1.

• as_dict (bool) –

The type of the returned object. If True, return a dictionary. Otherwise, return an array.

By default it is set to False.

Returns

The realizations of the random variables,

either stored in an array or in a dictionary whose values are the names of the random variables and the values are the evaluations.

Return type

Union[Dict[str, numpy.ndarray], numpy.ndarray]

property deterministic_variables

The deterministic variables.

dict_to_array(x_dict, all_vars=True, all_var_list=None)

Convert an point as dictionary into an array.

Parameters
• x_dict (Dict[str, numpy.ndarray]) – The point to be converted.

• all_vars (bool) –

If True, all the variables to be considered shall be in the provided point.

By default it is set to True.

• all_var_list (Optional[Sequence[str]]) –

The variables to be considered. If None, use the variables of the design space.

By default it is set to None.

Returns

The point as an array.

Return type

numpy.ndarray

evaluate_cdf(value, inverse=False)[source]

Evaluate the cumulative density function (or its inverse) of each marginal.

Parameters
• value (Dict[str, numpy.ndarray]) – The values of the uncertain variables passed as a dictionary whose keys are the names of the variables.

• inverse (bool) –

The type of function to evaluate. If True, compute the cumulative density function. Otherwise, compute the inverse cumulative density function.

By default it is set to False.

Returns

A dictionary where the keys are the names of the random variables

and the values are the evaluations.

Return type

Dict[str, numpy.ndarray]

export_hdf(file_path, append=False)

Export the design space to an HDF file.

Parameters
• file_path (Union[str, pathlib.Path]) – The path to the file to export the design space.

• append (bool) –

If True, appends the data in the file.

By default it is set to False.

Return type

None

Export the design space to a text file.

Parameters
• output_file (Union[str,Path],) – The path to the file.

• fields (Optional[Sequence[str]]) –

The fields to be exported. If None, export all fields.

By default it is set to None.

By default it is set to .

• **table_options (Any) – The names and values of additional attributes for the PrettyTable view generated by get_pretty_table().

Return type

None

extend(other)

Extend the design space with another design space.

Parameters

other (gemseo.algos.design_space.DesignSpace) – The design space to be appended to the current one.

Return type

None

extract_deterministic_space()[source]

Define a new DesignSpace from the deterministic variables only.

Returns

A DesignSpace defined by the deterministic variables only.

Return type

gemseo.algos.design_space.DesignSpace

extract_uncertain_space(as_design_space=False)[source]

Define a new DesignSpace from the uncertain variables only.

Parameters

as_design_space (bool) –

If False, return a ParameterSpace containing the original uncertain variables as is; otherwise, return a DesignSpace where the original uncertain variables are made deterministic. In that case, the bounds of a deterministic variable correspond to the limits of the support of the original probability distribution and the current value correspond to its mean.

By default it is set to False.

Returns

A ParameterSpace defined by the uncertain variables only.

Return type
filter(keep_variables, copy=False)

Filter the design space to keep a subset of variables.

Parameters
• keep_variables (Union[str, Iterable[str]]) – The names of the variables to be kept.

• copy (bool) –

If True, then a copy of the design space is filtered, otherwise the design space itself is filtered.

By default it is set to False.

Returns

Either the filtered original design space or a copy.

Raises

ValueError – If the variable is not in the design space.

Return type

gemseo.algos.design_space.DesignSpace

filter_dim(variable, keep_dimensions)

Filter the design space to keep a subset of dimensions for a variable.

Parameters
• variable (str) – The name of the variable.

• keep_dimensions (Iterable[int]) – The dimensions of the variable to be kept, between $$0$$ and $$d-1$$ where $$d$$ is the number of dimensions of the variable.

Returns

The filtered design space.

Raises

ValueError – If a dimension is unknown.

Return type

gemseo.algos.design_space.DesignSpace

get(k[, d]) D[k] if k in D, else d.  d defaults to None.
get_active_bounds(x_vec=None, tol=1e-08)

Determine which bound constraints of the current point are active.

Parameters
• x_vec (Optional[numpy.ndarray]) –

The point at which to check the bounds. If None, use the current point.

By default it is set to None.

• tol (float) –

The tolerance of comparison of a scalar with a bound.

By default it is set to 1e-08.

Returns

Whether the components of the lower and upper bound constraints are active, the first returned value representing the lower bounds and the second one the upper bounds, e.g.

({'x': array(are_x_lower_bounds_active),
'y': array(are_y_lower_bounds_active)},
{'x': array(are_x_upper_bounds_active),
'y': array(are_y_upper_bounds_active)}
)

where:

are_x_lower_bounds_active = [True, False]
are_x_upper_bounds_active = [False, False]
are_y_lower_bounds_active = [False]
are_y_upper_bounds_active = [True]

Return type

Tuple[Dict[str, numpy.ndarray], Dict[str, numpy.ndarray]]

get_current_x(variables_names=None)

Return the current point in the design space.

Parameters

variables_names (Optional[Iterable[str]]) –

The names of the required variables. If None, use the names of the variables of the design space.

By default it is set to None.

Raises

KeyError – If a variable has no current value.

Return type

numpy.ndarray

get_current_x_dict()

Return the current point in the design space as a dictionary.

Returns

The current point in the design space as a dictionary, whose keys are the names of the variables and values are the values of the variables.

Return type

Dict[str, numpy.ndarray]

get_current_x_normalized()

Return the current point normalized.

Returns

The current point as an array normalized by the bounds of the variables.

Returns

If the current point cannot be normalized.

Return type

KeyError

get_indexed_var_name(variable_name)

Create the names of the components of a variable.

If the size of the variable is equal to 1, this method returns the name of the variable. Otherwise, it concatenates the name of the variable, the separator SEP and the index of the component.

Parameters

variable_name (str) – The name of the variable.

Returns

The names of the components of the variable.

Return type

Union[str, List[str]]

get_indexed_variables_names()

Create the names of the components of all the variables.

If the size of the variable is equal to 1, this method uses its name. Otherwise, it concatenates the name of the variable, the separator SEP and the index of the component.

Returns

The name of the components of all the variables.

Return type

List[str]

get_lower_bound(name)

Return the lower bound of a variable.

Parameters

name (str) – The name of the variable.

Returns

The lower bound of the variable (possibly infinite).

Return type

numpy.ndarray

get_lower_bounds(variables_names=None)

Generate an array of the variables’ lower bounds.

Parameters

variables_names (Optional[Sequence[str]]) –

The names of the variables of which the lower bounds are required. If None, use the variables of the design space.

By default it is set to None.

Returns

The lower bounds of the variables.

Return type

numpy.ndarray

get_pretty_table(fields=None)

Build a tabular view of the design space.

Parameters

fields (Optional[Sequence[str]]) –

The name of the fields to be exported. If None, export all the fields.

By default it is set to None.

Returns

A tabular view of the design space.

Return type

gemseo.third_party.prettytable.prettytable.PrettyTable

get_range(variable)[source]

Return the numerical range of a random variable.

Parameters

variable (str) – The name of the random variable.

Returns

The range of the components of the random variable.

Return type

List[numpy.ndarray]

get_size(name)

Get the size of a variable.

Parameters

name (str) – The name of the variable.

Returns

The size of the variable, None if it is not known.

Return type

Optional[int]

get_support(variable)[source]

Return the mathematical support of a random variable.

Parameters

variable (str) – The name of the random variable.

Returns

The support of the components of the random variable.

Return type

List[numpy.ndarray]

get_tabular_view(decimals=2)[source]

Return a tabular view of the parameter space.

This view contains statistical information.

Parameters

decimals (int) –

The number of decimals to print.

By default it is set to 2.

Returns

The tabular view.

Return type

str

get_type(name)

Return the type of a variable.

Parameters

name (str) – The name of the variable.

Returns

The type of the variable, None if it is not known.

Return type

Optional[str]

get_upper_bound(name)

Return the upper bound of a variable.

Parameters

name (str) – The name of the variable.

Returns

The upper bound of the variable (possibly infinite).

Return type

numpy.ndarray

get_upper_bounds(variables_names=None)

Generate an array of the variables’ upper bounds.

Parameters

variables_names (Optional[Sequence[str]]) –

The names of the variables of which the upper bounds are required. If None, use the variables of the design space.

By default it is set to None.

Returns

The upper bounds of the variables.

Return type

numpy.ndarray

get_variables_indexes(variables_names)

Return the indexes of a design array corresponding to the variables names.

Parameters

variables_names (Iterable[str]) – The names of the variables.

Returns

The indexes of a design array corresponding to the variables names.

Return type

numpy.ndarray

has_current_x()

Check if the current design value is defined for all variables.

Returns

Whether the current design value is defined for all variables.

Return type

bool

import_hdf(file_path)

Import a design space from an HDF file.

Parameters

file_path (Union[str, pathlib.Path]) – The path to the file containing the description of a design space.

Return type

None

static init_from_dataset(dataset, groups=None, uncertain=None, copula='independent_copula')[source]

Initialize the parameter space from a dataset.

Parameters
• dataset (Dataset) – The dataset used for the initialization.

• groups (Optional[Iterable[str]]) –

The groups of the dataset to be considered. If None, consider all the groups.

By default it is set to None.

• uncertain (Optional[Mapping[str,bool]]) –

Whether the variables should be uncertain or not.

By default it is set to None.

• copula (str) –

A name of copula defining the dependency between random variables.

By default it is set to independent_copula.

Return type

ParameterSpace

is_deterministic(variable)[source]

Check if a variable is deterministic.

Parameters

variable (str) – The name of the variable.

Returns

True is the variable is deterministic.

Return type

bool

is_uncertain(variable)[source]

Check if a variable is uncertain.

Parameters

variable (str) – The name of the variable.

Returns

True is the variable is uncertain.

Return type

bool

items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys

This method is based on the chain rule:

$\frac{df(x)}{dx} = \frac{df(x)}{dx_u}\frac{dx_u}{dx} = \frac{df(x)}{dx_u}\frac{1}{u_b-l_b}$

where $$x_u = \frac{x-l_b}{u_b-l_b}$$ is the normalized input vector, $$x$$ is the unnormalized input vector and $$l_b$$ and $$u_b$$ are the lower and upper bounds of $$x$$.

$\frac{df(x)}{dx_u} = (u_b-l_b)\frac{df(x)}{dx}$

where $$\frac{df(x)}{dx}$$ is the unnormalized one.

Parameters

g_vect (numpy.ndarray) – The gradient to be normalized.

Returns

Return type

numpy.ndarray

normalize_vect(x_vect, minus_lb=True, use_dist=False)[source]

Normalize a vector of the parameter space.

If use_dist is True, use the cumulative probability distributions of the random variables to scale the components of the random variables between 0 and 1. Otherwise, use the approach defined in DesignSpace.normalize_vect() with minus_lb.

For the components of the deterministic variables, use the approach defined in DesignSpace.normalize_vect() with minus_lb.

Parameters
• x_vect (numpy.ndarray) – The values of the design variables.

• minus_lb (bool) –

If True, remove the lower bounds at normalization.

By default it is set to True.

• use_dist (bool) –

If True, normalize the components of the random variables with their cumulative probability distributions.

By default it is set to False.

Returns

The normalized vector.

Return type

numpy.ndarray

pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

project_into_bounds(x_c, normalized=False)

Project a vector onto the bounds, using a simple coordinate wise approach.

Parameters
• normalized (bool) –

If True, then the vector is assumed to be normalized.

By default it is set to False.

• x_c (numpy.ndarray) – The vector to be projected onto the bounds.

Returns

The projected vector.

Return type

numpy.ndarray

Create a design space from a text file.

Parameters
• input_file (Union[str, pathlib.Path]) – The path to the file.

The names of the fields saved in the file. If None, read them in the file.

By default it is set to None.

Returns

The design space read from the file.

Raises

ValueError – If the file does not contain the minimal variables in its header.

Return type

gemseo.algos.design_space.DesignSpace

remove_variable(name)[source]

Remove a variable from the probability space.

Parameters

name (str) – The name of the variable.

Return type

None

round_vect(x_vect)

Round the vector where variables are of integer type.

Parameters

x_vect (numpy.ndarray) – The values to be rounded.

Returns

The rounded values values.

Raises

ValueError – If the values is not a one- or two-dimensional

Return type

numpy.ndarray

set_current_variable(name, current_value)

Set the current value of a single variable.

Parameters
• name – The name of the variable.

• current_value – The current value of the variable.

set_current_x(current_x)

Set the current point.

Parameters

current_x (Union[numpy.ndarray, Mapping[str, numpy.ndarray], gemseo.algos.opt_result.OptimizationResult]) – The value of the current point.

Raises
• ValueError – If the value has a wrong dimension.

• TypeError – If the current point is neither a mapping of NumPy arrays, a NumPy array nor an OptimizationResult.

Return type

None

set_lower_bound(name, lower_bound)

Set the lower bound of a variable.

Parameters
• name (str) – The name of the variable.

• lower_bound (numpy.ndarray) – The value of the lower bound.

Raises

ValueError – If the variable does not exist.

Return type

None

set_upper_bound(name, upper_bound)

Set the upper bound of a variable.

Parameters
• name (str) – The name of the variable.

• upper_bound (numpy.ndarray) – The value of the upper bound.

Raises

ValueError – If the variable does not exist.

Return type

None

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
to_complex()

Cast the current value to complex.

Return type

None

to_design_space()[source]

Convert the parameter space into a DesignSpace.

The original deterministic variables are kept as is while the original uncertain variables are made deterministic. In that case, the bounds of a deterministic variable correspond to the limits of the support of the original probability distribution and the current value correspond to its mean.

Returns

A DesignSpace where all original variables are made deterministic.

Return type

gemseo.algos.design_space.DesignSpace

transform_vect(vector)[source]

Map a point of the design space to a vector with components in $$[0,1]$$.

Parameters

vector (numpy.ndarray) – A point of the design space.

Returns

A vector with components in $$[0,1]$$.

Return type

numpy.ndarray

This method is based on the chain rule:

$\frac{df(x)}{dx} = \frac{df(x)}{dx_u}\frac{dx_u}{dx} = \frac{df(x)}{dx_u}\frac{1}{u_b-l_b}$

where $$x_u = \frac{x-l_b}{u_b-l_b}$$ is the normalized input vector, $$x$$ is the unnormalized input vector, $$\frac{df(x)}{dx_u}$$ is the unnormalized gradient $$\frac{df(x)}{dx}$$ is the normalized one, and $$l_b$$ and $$u_b$$ are the lower and upper bounds of $$x$$.

Parameters

g_vect (numpy.ndarray) – The gradient to be unnormalized.

Returns

Return type

numpy.ndarray

unnormalize_vect(x_vect, minus_lb=True, no_check=False, use_dist=False)[source]

Unnormalize a normalized vector of the parameter space.

If use_dist is True, use the inverse cumulative probability distributions of the random variables to unscale the components of the random variables. Otherwise, use the approach defined in DesignSpace.unnormalize_vect() with minus_lb and no_check.

For the components of the deterministic variables, use the approach defined in DesignSpace.unnormalize_vect() with minus_lb and no_check.

Parameters
• x_vect (numpy.ndarray) – The values of the design variables.

• minus_lb (bool) –

If True, remove the lower bounds at normalization.

By default it is set to True.

• no_check (bool) –

If True, do not check that the values are in [0,1].

By default it is set to False.

• use_dist (bool) –

If True, unnormalize the components of the random variables with their inverse cumulative probability distributions.

By default it is set to False.

Returns

The unnormalized vector.

Return type

numpy.ndarray

untransform_vect(vector)[source]

Map a vector with components in $$[0,1]$$ to the design space.

Parameters

vector (numpy.ndarray) – A vector with components in $$[0,1]$$.

Returns

A point of the variables space.

Return type

numpy.ndarray

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
class gemseo.algos.parameter_space.RandomVariable(distribution, size, parameters)

Bases: tuple

Create new instance of RandomVariable(distribution, size, parameters)

Methods:

 count(value, /) Return number of occurrences of value. index(value[, start, stop]) Return first index of value.

Attributes:

 distribution Alias for field number 0 parameters Alias for field number 2 size Alias for field number 1
count(value, /)

Return number of occurrences of value.

distribution

Alias for field number 0

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

parameters

Alias for field number 2

size

Alias for field number 1


text:
## Fractional iterates

2017 Dec 8

In previous posts, I've written about finding formulas for $f^{\circ n}$ in terms of $n$, but I've considered iterates of $f$ only for integer values of $n$. I will now discuss an extension of the definition of $f^{\circ n}$ to include rational non-integer values of $n$.

Find half-iterates of the functions and find a continuous half-iterate of the function

Recall that function iteration has the properties and The second property might lead us to say that and so we shall define $f^{\circ 1/n}$ as any function satisfying Notice that I say any function, as such functions are not always unique. For example, consider $\text{id}{\mathbb R}^{\circ 1/2}$. The functions $\text{id}{\mathbb R}$ and $-\text{id}{\mathbb R}$ iterated twice both yield $\text{id}{\mathbb R}$, providing an example of how half-iterates are not always unique. Thus we may think of the fractional iterate $f^{\circ 1/n}$ not as a function, but as as set of functions, each of which, when iterated $n$ times, yield the function $f$. Using our previous example, we might say that and

First I will tackle the problem of finding all continuous functions in the set $\text{id}{\mathbb R}^{\circ 1/2}$ - or the set of continuous involutions on the reals. Notice that I say continuous - in this post, I will not deal with any non-continuous function, since they can get pretty messy. We've already noted that $-\text{id}{\mathbb R}$ is in this set. With a bit of further analysis, one may observe that all functions in the form satisfy it as well, if $g:\mathbb R\mapsto\mathbb R$.

But is this set of solutions exhaustive? That is, if $f:\mathbb R\mapsto\mathbb R$ satisfies $f^{\circ 2}=\text{id}_{\mathbb R}$, does there necessarily exist a function $g:\mathbb R\mapsto\mathbb R$ such that $f(x)=g^{-1}(-g(x))$?

The answer is yes, but proving it will take a little bit of work. First we must prove a property that all half-iterates of the identity function share.

Notice first that if a function $f$ is non-injective, then the function $f^{\circ 2}$ is also non-injective. Thus, if $f$ is a half-iterate of the identity function, since the identity function is injective, $f$ must also be injective. Continuous and injective functions are always either increasing or decreasing, implying that $f$ is either increasing or decreasing. So for now, suppose that $f$ is increasing.

Suppose that $f(x)\gt x$ for some $x$. Then, since $f$ is increasing, $f^{\circ 2}(x)\gt f(x)$ and, since $f^{\circ 2}=\text{id}{\mathbb R}$, we have $x\lt f(x)$. Contradiction! If we instead suppose that $f(x)\lt x$ for some $x$, we arrive at a similar contradiction. Thus we have that if $f$ is increasing, than $f$ cannot be greater than or less than its input for any input, meaning that $f=\text{id}{\mathbb R}$. Thus, the only continuous increasing function in $\text{id}_{\mathbb R}^{\circ 1/2}$ is the identity function.

This tells us that the only continuous increasing involution on the reals is the identity function, meaning that all others must be decreasing. This is the property that I wanted to prove from the beginning. Since all such functions are decreasing, they must all have exactly one fixed point. If $f^{\circ 2}=\text{id}{\mathbb R}$ and $f$ is continuous and decreasing, I will call its fixed point $\phi$. Let us now define $$g(x)=$$ for any continuous, injective function $h$ with $h(\phi)=0$. From here, it is trivial to verify that both $g$ is continuous and that $g^{-1}(-g(x))=f(x)$, showing that for any function $f$ in $\text{id}{\mathbb R}^{\circ 1/2}$, there exists a continuous function $g$ such that $g^{-1}(-g(x))=f(x)$, thus showing that the set of functions in the form $g^{-1}(-g(x))$ for continuous and injective $g$ provides an exhaustive set of continuous involutions on the real numbers.

Next I will consider continuous $\text{id}{\mathbb R}^{\circ 1/3}$ - which, thankfully, is a much easier problem. Again, the key is to notice that any continuous function $f\in\text{id}{\mathbb R}^{\circ 1/3}$ must be injective, and thus either increasing or decreasing. If $f$ is increasing, then we may use an argument similar to the one used previously to show that $f=\text{id}{\mathbb R}$. If $f$ is decreasing, then for all $x,y\in\mathbb R$, and so and making $f^{\circ 3}$ decreasing, which contradicts the fact that $f^{\circ 3}=\text{id}{\mathbb R}$. Thus the only continuous function in $\text{id}_{\mathbb R}^{\circ 1/3}$ is the identity function.

One can use decreasingness to prove the nonexistence of continuous half-iterates of many other functions, even if they aren't strictly decreasing. For example, suppose a differentiable function $f$ has a fixed point at $x=\phi$ such that $f'(\phi)$ is less than zero. Then, for some neighborhood $N$ of $\phi$, $f$ must be decreasing, since its derivative at $x=\phi$ is negative. If we now assume that a continuous $h\in f^{\circ 1/2}$ exists, we may state immediately that it is injective in $N$, since $f$ is injective in $N$. Thus it is either increasing or decreasing in $N$. But h being increasing or decreasing in $N$ both imply that $h^{\circ 2}=f$ is increasing in $N$, leading to a contradiction. This method can be used, for example, to show that the cosine function has no continuous half-iterate, since it is decreasing at its fixed point.

So far, all I've done is disprove the existence of half-iterates of functions. Now I will demonstrate how one might construct a specific half-iterate of a function.

Some functions have nice and neat closed-form half-iterates. For example, consider the function Because we can rewrite this as we can easily find the following half-iterate $h\in a^{\circ 1/2}$:

Some functions have half-iterates that are a bit harder to find. Consider for example the function Some half-iterates of this function can be defined as piecewise functions. An example is $h_1,h_2\in b^{\circ 1/2}$:

Sometimes, piecewise construction of half-iterates can get a little bit wild. Before I demonstrate a construction of a half-iterate of the exponential function, I must explain the graphical construction technique that I used for it. Imagine that $f:\mathbb R\mapsto\mathbb R$ is a function with half-iterate $h:\mathbb R\mapsto\mathbb R$, and suppose we know the value of $h(x_0)$ for some $x_0$. Let $h_0$ be this value. Then we have that which implies or and we know another value of $h$! But we can take this even further and say that and so on. Let's think of this information in terms of the graph of $y=h(x)$. We were given initially that the point $(x_0,h_0)$ was on the graph, and from this, we determined that the points $(h_0,f(x_0))$ and $(f(x_0),f(h_0))$ were also on the graph. In general, if the point $(a,b)$ is on the graph of $y=h(x)$, then the point $(b,f(a))$ is also on the graph. Visually, this means that if we assume some point $P$ is on the graph of $y=h(x)$, we may use the following steps to find another point $P'$ on the graph:

• Plot the point $P$ and graph the curves $y=f(x)$ and $y=x$.
• Draw the horizontal line segment $PQ$, where $Q$ is on the graph of $y=x$.
• Draw the vertical line seqment $PR$, where $R$ is on the graph of $y=f(x)$.
• Construct rectangle $PQP'R$. Then the point $P'$ is also on the graph of $y=h(x)$.

Here is a picture illustrating this process:

Though it may sound complicated, this process is as easy as drawing a rectangle, and it can lead to some interesting results. For example, consider the function $f$ in my example graph (it does not matter exactly what function it is). By assuming that the point $P$ was on the graph of $y=h(x)$, we found the point $P'$ also on $y=h(x)$. Notice that $P$ lies below the curve $y=f(x)$ and $P'$ lies above it. Thus, if we assume $h$ to be continuous, then by the intermediate value theorem, the curves $y=f(x)$ and $y=h(x)$ must intersect at some $x$-value between the x-values of $P$ and $P'$. Thus, for some $x'$ in that interval, or implying that $h$ has a fixed point at $x=h(x')$, and thus that $f$ also has this fixed point. But since $f$ only has one fixed point between the y-values of $P$ and $P'$ (call it $\phi$), then This could go on - for example, we could keep drawing rectangles to find $P''$, and $P'''$, et cetera.

This method can be used to prove the following interesting result:

If a function $f:\mathbb R\mapsto\mathbb R$ has no fixed points and has a continuous half-iterate $h:\mathbb R\mapsto\mathbb R$, then $h(x)$ is between $x$ and $f(x)$ for all $x\in\mathbb R$.

This is a rather nice result, but the proof is unpleasant and uses a lot of casework, so I will omit it.

Now I will lay out my construction of a half-exponential function, as written in one of my answers on MSE:

Define a sequence $a_n$ as follows: and define a sequence of functions $H_n$ as follows: Then one may verify rather simply that the function or is a half-iterate of $e^x$. Amazingly, it can be proven by induction that this function is continuous and differentiable everywhere. Unfortunately, it is not twice-differentiable. Here is a graph of this function (in orange) alongside a graph of $y=e^x$ (in purple):

One might wonder if there exists a half-iterate of $e^x$ that is infinitely differentiable as $e^x$ is... but that topic will have to be left for a later blog post.

format: plain


text:
# Game maker else checks all ifs?

I have a list of if functions (checking if various spots in the room are empty) in one event. I want to check them ALL with an else statement (if none of the spots are cleared), and display a message. How would I do this?

I do not know about game maker, but if it is as in the other programming languages, you must nest all the ifs, one inside the other.

If there is an object
Start
Create Instance
End
If there is an object
Start
Create Instance
End
//....
Else
Start
Do Something else
End

You should try:

If there is an object
Start
Create Instance
End
Else
Start
If there is an object
Start
Create Instance
End
Else
Start
If there is an object
Start
Create Instance
End
End
Else
Start
Do Something Else.
End
End
//....

Gustavo Maciel wrote right answer. But I want add one more solution (sometime it can be very useful).

Using code it can be something like this:

var result = false;
if (statement)
{
// action 1;
result = true;
}
...
if (statement)
{
// action N;
result = true;
}

// no actions
if !result             // same with: if (result = false)
{
// else action
}

P.S. I advise nevertheless to use a code, but not buttons. Solution of Gustavo Maciel via code:

if position_meeting(pos_x, pos_y, your_object)
{
instance_create(pos_x, pos_y, blockObject);
result = true;
}
else if position_meeting(pos_x, pos_y, your_object)
{
instance_create(pos_x, pos_y, blockObject);
result = true;
}
...
else if position_meeting(pos_x, pos_y, your_object)
{
instance_create(pos_x, pos_y, blockObject);
result = true;
}
else
{
}

Of course, here need to change all coords and object names.

btw,

else if (statement)
{
}

it same with

else
{
if (statement)
{
}
}

• Yep, this is it, but I tried to answer it only using "event" kinda code, like I saw in the Screenshot! If gamemaker has else ifs, then go for it! – Gustavo Maciel Jun 2 '15 at 0:46


text:
# Printing all elements of table in Fortran form

Let's say I have some Table object. The elements of this table are accessed as Table[[i,j,k]].

For each element in the array I want to convert it to FortranForm and then construct a string of the form STRING_IJK = value where value is the specific table element FortranForm[Table[[i,j,k]]].

I then want to save all of these strings to an external file.

Is there a method to do this? Thanks

Assuming your table is called something like myTable:

fortranTable = Flatten[Table[
"STRING_" <> ToString[i] <> ToString[j] <> ToString[k] <> " = " <>
ToString[myTable[[i, j, k]] // FortranForm],
{i, Dimensions[myTable][[1]]},
{j, Dimensions[myTable][[2]]},
{k, Dimensions[myTable][[3]]}]]

<> is the concatenation operator for strings, so I'm just converting the indices to strings and then joining them together. I have an expression like x^26 in position 111, I get: STRING_111 = x**26.

EDIT:

If you want to export the final table, the following works but tweaks can be made depending on exactly what you want the output to look like.

Export["filelocation/filename.txt", fortranTable]

I believe you can use either double backslashes \\ to separate the parts of file names or a single slash, and of course filelocation and filename should be changed to suit your needs, but the quotation marks are required. This should give you a file where each entry in the table has its own line (that is, they're separated by '\n').

• This is great. Is there a way to then save the output to file? – user1887919 Mar 8 '19 at 10:11
• @user1887919 I've edited my answer to include the export as well. – MassDefect Mar 8 '19 at 16:17


text:
A famous algorithm, a new paper, a full correctness proof

Vijay Vazirani is one of the world experts on algorithmic theory, and is especially known for his masterful book on approximation algorithms. Among many results in computational complexity, two have been Wikified: his theorem with Les Valiant on unique SAT, and the subsequent generalized Isolation Lemma with Ketan Mulmuley and his brother Umesh Vazirani. Lately his focus has been more on computational aspects of auctions, economic systems, and game theory.

Today Ken and I wish to discuss a recent paper by Vijay on matching.

His paper is quite unique—is “quite” redundant?—well it is an isolated case of a top researcher taking the time and energy to explain the correctness of one of his famous algorithms, originally in joint work with Silvio Micali. As our field matures we should see more of this.

Given an undirected graph ${G=(V,E)}$ a matching, of course, is a set of pairwise non-adjacent edges: no two edges share a common vertex. A maximum matching is a matching that contains the largest possible number of edges. If ${|V|}$ is even then a matching with ${|V|/2}$ edges is perfect. The notorious Petersen graph

has six different perfect matchings: the five “spokes” and others using just one spoke. Although matchings are often associated with bipartite graphs, it is important to note that the Petersen graph is not bipartite. This is important since the matching algorithm we will discuss works for general graphs, not just bipartite graphs.

## The Importance Of Matching

Finding a maximum matching is one of the foundational problems at the intersection of graph theory and algorithmic theory. The reason for this is:

• The problem is useful in practice. Unlike many problems that are sometimes studied in theory, people really would like to be able to find matchings of general graphs. See this for a detailed list.

• The problem is basic to the theory of graphs. László Lovász and Michael Plummer wrote an entire book called Matching Theory on—you guessed right—matchings. They shared the Niveau Prize of the Hungarian Academy of Sciences for this book in 1991. We especially like the Amazon review of the book:

The subject has obviously advanced a lot since the book was published, but the overview provided is still unmatched.

Cool pun.

• The problem is basic to the theory of algorithms. Euclid may have the first non-trivial algorithm, his algorithm for finding the gcd of two numbers, but algorithms for matching started over fifty years ago. This is not the place to trace out the long and complex history of who did what algorithm for finding matchings. Suffice it to say that much of the theory of algorithms can be traced to the history of matching algorithms: various tricks and methods that are used through computing often first appeared in matching algorithms. Andras Frank has written a wonderful piece called On Kuhn’s Hungarian Method—A tribute from Hungary about the bipartite case—see it for some interesting history.

Here is a picture of some of the applications of matching algorithms.

Let’s turn to look at Vijay’s new paper.

## The Paper’s Tracks

Actually we need to first look at the original paper called An ${O(\sqrt{|V|}|E|)}$ algoithm for finding maximum matching in general graphs by Silvio Micali and Vijay Vazirani. It was published in the 21st Annual Symposium on Foundations of Computer Science in 1980.

We will call this paper the MV paper, and its algorithm the MV algorithm. Note the running time is ${O(m\sqrt{n})}$ using “modern” internationally agreed-upon notation: we use ${n}$ always to denote the number of vertices and ${m}$ the number of edges. Paul Halmos was always careful about notation, and once said that his worst nightmare was that someone would type

$\displaystyle \lim_{\epsilon \rightarrow \infty} n_{\epsilon} = 0.$

The title of Vijay’s original paper was created before these agreements, so it is understandable that they used the “old” style notation in the title. It is also less prone to the problem that if you write ${O(\sqrt{n}m)}$ it may be hard to see that the square-root sign does not also cover the ${m}$.

This paper presented the MV algorithm with the given running time. The major advance was that it efficiently found a maximum matching in general graphs. There is an interesting cliff that happens in the theory of algorithms for finding maximum matchings. Bipartite graphs are just much easier for matching algorithms. Of course they are easier for many other algorithms: it is trivial to find a 2-coloring of a bipartite graph, but NP-hard to find a 3-colring in a general graph. One of the achievements of the MV paper is that everything works for general graphs.

The new paper is solely authored by Vijay. It has several goals, but the main one is to give a clear but full proof of the correctness of the MV algorithm. The algorithm remains the same, but the correctness proof is new. The previous proof had a flawed case analysis. The new proof avails itself of information that the previous proof bypassed, to make the analysis tighter and more manageable.

We will not give the whole proof, but we will give an algorithmic idea highlighted also by Vijay, which has independent interest.

## Dueling Depth-First Searches

Let ${G = (V,E)}$ be a directed acyclic graph whose vertices are in layers numbered ${0}$ (for sinks) through ${\ell}$ (sources). Edges from any non-sink node go to nodes in lower layers, not necessarily the next layer, and every node has a path to a sink in layer ${0}$. Let ${g}$ and ${r}$ be any two non-sink nodes. By Menger’s Theorem, either

1. there are vertex-disjoint paths from ${r}$ and ${g}$ to sinks ${s_r}$ and ${s_g}$, or

2. the set ${B_{g,r} = \{v:}$ every path from ${g}$ or ${r}$ to a sink goes through ${v\}}$ is nonempty.

In the latter case, let ${b}$ be the element of ${B_{g,r}}$ in the highest layer. The algorithm must find this highest bottleneck node ${b}$ within time proportional to the total number of edges in paths from ${g}$ or ${r}$ to ${b}$. In the former case the algorithm must output paths to ${s_r}$ and ${s_g}$ within time proportional to the total number of edges on all paths from ${g}$ or ${r}$ to either of ${s_r}$ or ${s_g}$.

The main puzzle is, how can we avoid searching past ${b}$ and taking more than the time allowed to the latter case, if we don’t even know that it holds? For a single local search, this does indeed seem to be impossible. However, what Vijay called “Double Depth-First Search” (DDFS) solves it. Two search posses led by rangers Green and Red start respectively at ${g}$ and ${r}$ and mark out “green” and “red” nodes and edges both. Neither may tread on the other’s ground. The rules are:

• Whichever posse is on a higher-level node gets to move; if they are on the same level, Red moves.

• If one posse’s depth-first search comes to an already-marked empty node ${v}$—it could have been marked by either posse on an earlier visit—it goes back and tries another down-edge from its previous node. If there are no more down-edges, it backtracks up from its previous node as in normal depth-first search.

• If the other posse is on node ${v}$, however, Red and Green fight a duel at 20 paces.

 By permission of ComicArtFans gallery owner Mark Geier: source commissioned from artist Terry Beatty

The duel follows gentlemen’s rules. Red shoots in the air. Green takes the hint and backtracks looking for another node ${w}$ at the same level as ${v}$ or lower. If Green succeeds, he sends a Western Union telegram to Red, who puts his marker on ${v}$ and moves on. If Green gets stuck, then Red has to keep the same bargain. Red backtracks until he either finds another ${w}$ at the same level as ${v}$ or lower, whereupon he telegrams Green to come back and claim ${v}$ as his, or Red gets stuck too. If they are both stuck they both come back to ${v}$. Each claims just the respective (necessarily different) (sets of) edges he followed into ${v}$, but they identify ${v}$ itself as the highest bottleneck ${b}$ and share a bottle of hooch to celebrate.

They can celebrate because they have met the time guarantee: Neither searched below ${b}$, and all the edges they traversed in their wanderings had to be on paths to ${b}$, since they did not find any open trails going elsewhere. And in the case where they reach separate destinations ${s_g}$ and ${s_r}$, any backtracking done by one posse because of hitting the other’s marked node is inductively on a path to the other’s goal, so at most the various routes between ${\{g,r\}}$ and ${\{s_g,s_r\}}$ get searched.

Making a search posse on a lower level wait for the other ensures that nodes below a bottleneck don’t get searched. Many other parts of the algorithm similarly rely on co-ordination with delicate timing considerations; this is just a taste of them. The new paper also has many other figurative concepts, with illustrations.

## Open Problems

Do read Vijay’s paper. It is one of the clearest expositions of a graph algorithm—a model for others. Also the idea that Vijay went back to an ancient paper—over thirty years old—solely to write the definitive proof of its correctness is something we all should applaud.

Of course the central problem in matching theory is still what is the best time for an algorithm that finds a maximum matching? Given the interest today in huge graphs that arise from social networks we will like a linear time algorithm. Is this possible? See this for some fast approximate algorithms.

[added words “on all paths” to DDFS time requirement, name and word fixes and adds, permission for vintage Green Hornet/Lone Ranger artwork]

March 28, 2014 12:52 pm

“A matching M in an undirected graph G = (V;E) is a set of edges no two of which meet at
a vertex. Our problem is to find a matching of maximum cardinality in the given graph. All
definitions henceforth are w.r.t. a fixed matching M in G.

An alternating path is a simple path whose alternate edges are matched and unmatched. An alternating path that starts and ends at unmatched vertices is called an augmenting path.”

I can infer the definition of unmatched edges, but what the heck are unmatched vertices?

I shouldn’t be stuck on the definitions in a paper that supposedly has a “lot to be desired in terms of correctness, completeness and clarity”.

2. March 28, 2014 5:07 pm

“VV” recently started blogging over at Turing invisible hand…. what is this cyberspace neighborhood coming to? 🙄

3. March 28, 2014 5:14 pm

another interesting factoid about matching from john savage book “models of computation” notes p457, hopes about using monotone circuits to prove major lower bounds were somewhat dashed by the following:

Having shown that monotone circuit complexity can lead to exponential lower bounds,
Razborov [271] then cast doubt on the likelihood that this approach would lead to exponential
non-monotone circuit size bounds by proving that the matching problem on bipartite graphs,
a problem in P, has a super-polynomial monotone circuit size.

March 28, 2014 6:08 pm

How does this relate to

Norbert Blum: A New Approach to Maximum Matching in General Graphs. ICALP 1990: 586-597

and

Paul A. Peterson, Michael C. Loui: The General Maximum Matching Algorithm of Micali and Vazirani. Algorithmica 3: 511-533 (1988) ?

My outsider impression is that there were other works that had already fixed the issue, but I couldn’t find them cited in the new paper.

5. March 29, 2014 8:34 am

In a sense, every algorithm is an approximation algorithm since the notion of correctness lies on psychology, and therefore on probability at the bottom line. The same holds true for proofs. My theory consists in saying that the algorithms you can prove correct with a high degree of certainly, are precisely those you can’t prove efficient with a high certainty, and vice versa. The easy problems are those where this indetermination is hardly noticeable, while the hard problems are those where the notion of polynomial behavior doesn’t even make sense, because the algorithms are all galactic and can’t be run on any physical processor.

Of course this is a theory of physics, not of mathematics. I’m the first to regret, because I would otherwise have thus proved the undecidability of the very undecidability of P=NP. Indeed, by just setting the Planck constant either positive – implying P=NP is undecidable – or null – implying P=NP is decidable – you get the expected result. Nonetheless, I still feel that algorithms behave like particles under the analogy “proof of correctness”= “position measurement”, “proof of efficiency” = “speed measurement”, undecidability = indetermination.

• March 30, 2014 12:54 pm

In fact, the P versus NP problem looks like a logical Möbius strip.

On the one side, it’s purely mathematical and P!=NP appears to be the right hypothesis – though probably unprovable. Ladner’s theorem then explains why there are three distinct kinds of hardness in NP – polynomial, neither polynomial nor NP-complete, NP-complete.

On the other side, the opposite hypothesis P=NP can be described with arguments of pure physics, with quantum leaps between the discrete levels of hardness – e.g. between the hardness of SORTING, FACTORING and SAT. Unfortunately, these arguments are probably unfalsifiable as well.

My conclusion is that we should give up any hope of settling this problem. Blame it on the metaphysics…

• March 31, 2014 3:53 pm

The physics level represents the hardware of computer science, whereas the mathematics level represents its software. Making this distinction might lead to new progress. These two levels of computer science should indeed be named differently.

It’s the same distinction as that which is made between logic and mathematics – which is actually software developed upon logical hardware. But logic – the other name of theoretical computer science – lies on an intermediate level between physics and mathematics.

The third level is – in my humble opinion – “the third man” who passes unnoticed much too often…

6. March 31, 2014 1:16 pm

I was very happy to see Vijay and Vijay’s beautiful paper featured here. I also share the compliments for this unique important endeavor. Making such an effort to give a clear, correct and inspiring proof for this classic algorithm (well it was a type of algorithm that became classic instantaneously but now it is also a few decades old) seems almost a thankless task. But in science often tasks that seems thankless turn out to lead to many fruits and recognition. And, of course, matching is such a great topic. A wonderful never-ending mine for beautiful mathematics, computer science, (and economics and more).


text:
0
91

# IBPS PO & RRB PO Prelims Simplification & Approximation Questions

Question 1: Simplify the following expression:
$\left(\frac{3}{4}-\frac{1}{4}\div\frac{1}{4} \text{of} \frac{2}{5}\right)\div\left(\frac{3}{4}\div\frac{2}{3} \text{of} \frac{3}{5}\right)$

a) $\frac{14}{75}$

b) $\frac{32}{75}$

c) $-\frac{70}{27}$

d) $-\frac{14}{15}$

Solution:

$\left(\frac{3}{4}-\frac{1}{4}\div\frac{1}{4} \text{of} \frac{2}{5}\right)\div\left(\frac{3}{4}\div\frac{2}{3} \text{of} \frac{3}{5}\right)$

= $\left(\frac{3}{4}-\frac{1}{4}\div\frac{2}{20}\right)\div\left(\frac{3}{4}\div\frac{6}{15}\right)$

= $\left(\frac{3}{4}-\frac{1}{4}\times\frac{20}{2}\right)\div\left(\frac{3}{4}\times\frac{15}{6}\right)$

= $\left(\frac{3}{4}-\frac{5}{2}\right)\div\left(\frac{15}{8}\right)$

= $\left(\frac{3-10}{4}\right)\div\left(\frac{15}{8}\right)$

= $\left(\frac{-7}{4}\right)\div\left(\frac{15}{8}\right)$

= $\left(\frac{-7}{4}\right)\times\left(\frac{8}{15}\right)$

= $-\frac{14}{15}$

Hence, the correct answer is Option D

Question 2: Simplify the following expression:
$\frac{7}{12} \div \frac{1}{10} \text{of} \frac{2}{3} – \frac{5}{3} \times \frac{9}{10} + \frac{5}{8} \div \frac{3}{4} \text{of} \frac{2}{3}$

a) $8\frac{1}{2}$

b) -4

c) $3\frac{23}{36}$

d) $7\frac{29}{36}$

Solution:

$\frac{7}{12}\div\frac{1}{10} \text{of} \frac{2}{3}-\frac{5}{3}\times\frac{9}{10}+\frac{5}{8}\div\frac{3}{4} \text{of} \frac{2}{3}$

= $\frac{7}{12}\div\frac{1}{15}-\frac{5}{3}\times\frac{9}{10}+\frac{5}{8}\div\frac{1}{2}$

= $\frac{7}{12}\times\frac{15}{1}-\frac{5}{3}\times\frac{9}{10}+\frac{5}{8}\times\frac{2}{1}$

= $\frac{35}{4}-\frac{3}{2}+\frac{5}{4}$

= $\frac{35-6+5}{4}$

= $\frac{34}{4}$

= $\frac{17}{2}$

= $8\frac{1}{2}$

Hence, the correct answer is Option A

Question 3: The value of $3\frac{1}{5} \div 4\frac{1}{2} \text{of} 5\frac{1}{3} – \frac{1}{8} \div \frac{1}{2} \text{of} \frac{1}{4} + \frac{1}{4}\left(\frac{1}{2} \div \frac{1}{8} \times \frac{1}{4}\right)$ is:

a) $-\frac{37}{60}$

b) $-\frac{17}{60}$

c) $\frac{17}{60}$

d) $\frac{37}{60}$

Solution:

$3\frac{1}{5} \div 4\frac{1}{2} \text{of} 5\frac{1}{3} – \frac{1}{8} \div \frac{1}{2} \text{of} \frac{1}{4} + \frac{1}{4}\left(\frac{1}{2} \div \frac{1}{8} \times \frac{1}{4}\right)$

= $\frac{16}{5} \div \frac{9}{2} \text{of} \frac{16}{3} – \frac{1}{8} \div \frac{1}{2} \text{of} \frac{1}{4} + \frac{1}{4}\left(\frac{1}{2} \times \frac{8}{1} \times \frac{1}{4}\right)$

= $\frac{16}{5}\div24-\frac{1}{8}\div\frac{1}{8}+\frac{1}{4}\left(1\right)$

= $\frac{16}{5\times24}-1+\frac{1}{4}$

= $\frac{2}{15}-1+\frac{1}{4}$

= $\frac{8-60+15}{60}$

= $-\frac{37}{60}$

Hence, the correct answer is Option A

Question 4: The value of $423 \div \left[270 \div \frac{3}{7} \times 35 + \left(17 \div \frac{1}{3}\right) – \left(8\frac{1}{2} – \frac{5}{2}\right)\right]$ is:

a) $\frac{51}{2455}$

b) $\frac{47}{2455}$

c) $\frac{43}{2455}$

d) $\frac{41}{2455}$

Solution:

$423\div\left[270\div\frac{3}{7}\times35+\left(17\div\frac{1}{3}\right)-\left(8\frac{1}{2}-\frac{5}{2}\right)\right]$

= $423\div\left[270\div\frac{3}{7}\times35+51-6\right]$

= $423\div\left[270\times\frac{7}{3}\times35+51-6\right]$

= $423\div\left[22050+51-6\right]$

= $423\div22095$

= $\frac{423}{22095}$

= $\frac{47}{2455}$

Hence, the correct answer is Option B

Question 5: The value of $\frac{33}{40}+\frac{1}{5}\left[\frac{4}{5}-\frac{1}{5}\times\left(\frac{7}{8}-\frac{5}{4}\right)\right]$ is:

a) 10

b) 0

c) 1

d) 5

Solution:

$\frac{33}{40}+\frac{1}{5}\left[\frac{4}{5}-\frac{1}{5}\times\left(\frac{7}{8}-\frac{5}{4}\right)\right]=\frac{33}{40}+\frac{1}{5}\left[\frac{4}{5}-\frac{1}{5}\times\left(\frac{7-10}{8}\right)\right]$

$=\frac{33}{40}+\frac{1}{5}\left[\frac{4}{5}-\frac{1}{5}\times\left(\frac{-3}{8}\right)\right]$

$=\frac{33}{40}+\frac{1}{5}\left[\frac{4}{5}-\left(\frac{-3}{40}\right)\right]$

$=\frac{33}{40}+\frac{1}{5}\left[\frac{4}{5}+\frac{3}{40}\right]$

$=\frac{33}{40}+\frac{1}{5}\left[\frac{32+3}{40}\right]$

$=\frac{33}{40}+\frac{1}{5}\left[\frac{35}{40}\right]$

$=\frac{33}{40}+\frac{7}{40}$

$=\frac{40}{40}$

$=1$

Hence, the correct answer is Option C

Question 6: If the numerator of a fraction is increased by 15% and denominator is decreased by 20%, then the fraction, so obtained, is $\frac{17}{65}$ What is the original fraction?

a) $\frac{272}{1495}$

b) $\frac{267}{1495}$

c) $\frac{278}{1495}$

d) $\frac{281}{1495}$

Solution:

Let the numerator of the fraction = $x$

Denominator of the fraction = $y$

Numerator when increased by 15% = $\frac{115}{100}x$

Denominator when decreased by 20% = $\frac{80}{100}y$

Given, new fraction = $\frac{17}{65}$

$=$>  $\frac{\frac{115}{100}x}{\frac{80}{100}y}=\frac{17}{65}$

$=$>  $\frac{115x}{80y}=\frac{17}{65}$

$=$>  $\frac{x}{y}=\frac{17\times80}{65\times115}$

$=$>  $\frac{x}{y}=\frac{272}{1495}$

$\therefore$The original fraction $=\frac{x}{y}=\frac{272}{1495}$

Hence, the correct answer is Option A

Question 7: The value of $\frac{1}{\left(9 – 4\sqrt{5}\right)^2} + \frac{1}{\left(9 + 4\sqrt{5}\right)^2}$ is:

a) 322

b) 424

c) 246

d) 286

Solution:

$\frac{1}{\left(9 – 4\sqrt{5}\right)^2} + \frac{1}{\left(9 + 4\sqrt{5}\right)^2}=\frac{1}{81+80-72\sqrt{5}}+\frac{1}{81+80+72\sqrt{5}}$

$=\frac{1}{161-72\sqrt{5}}+\frac{1}{161+72\sqrt{5}}$

$=\frac{161+72\sqrt{5}+161-72\sqrt{5}}{161^2-\left(72\sqrt{5}\right)^2}$

$=\frac{322}{25921-25920}$

$=322$

Question 8: The value of $\frac{5\frac{1}{2} \div 3\frac{2}{3} of \frac{1}{4} + \left(5\frac{1}{9} – 7\frac{7}{8} \div 9\frac{9}{20}\right) \times \frac{9}{11}}{5 \div 5 of \frac{1}{10} – 10 \times 10 \div 20}$ is:

a) $1\frac{4}{5}$

b) $1\frac{9}{10}$

c) $3\frac{4}{5}$

d) $9\frac{1}{2}$

Solution:

$\frac{5\frac{1}{2} \div 3\frac{2}{3} of \frac{1}{4} + \left(5\frac{1}{9} – 7\frac{7}{8} \div 9\frac{9}{20}\right) \times \frac{9}{11}}{5 \div 5 of \frac{1}{10} – 10 \times 10 \div 20}$

= $\frac{\frac{11}{2} \div \frac{11}{3} of \frac{1}{4} + \left(\frac{46}{9} – \frac{63}{8} \div \frac{189}{20}\right) \times \frac{9}{11}}{5 \div 5 of \frac{1}{10} – 10 \times 10 \div 20}$

= $\frac{\frac{11}{2} \div \frac{11}{12} + \left(\frac{46}{9} – \frac{63}{8} \div \frac{189}{20}\right) \times \frac{9}{11}}{5 \div \frac{1}{2} – 10 \times 10 \div 20}$

= $\frac{ 6 + \left(\frac{46}{9} – \frac{5}{6}\right) \times \frac{9}{11}}{10 – 10 \times 0.5}$

= $\frac{ 6 + \left( \frac{77}{18}\right) \times \frac{9}{11}}{5}$

= $\frac{ 6 + ( \frac{7}{2})}{5}$

=$\frac{19}{10} = 1 \frac{9}{10}$

Question 9: The value ok $\frac{\left(1\frac{1}{9} \times 1 \frac{1}{20} \div \frac{21}{38} – \frac{1}{3}\right) \div \left(2\frac{4}{9} \div 1\frac{7}{15} of \frac{3}{5}\right)}{\frac{1}{5} of \frac{1}{5} \div \frac{1}{125} – \frac{1}{25} \div \frac{1}{5} of \frac{1}{5}}$ lies between ………

a) 0.1 and 0.15

b) 0.2 and 0.25

c) 0.15 and 0.2

d) 0.25 and 0.3

Solution:

$\frac{\left(1\frac{1}{9} \times 1 \frac{1}{20} \div \frac{21}{38} – \frac{1}{3}\right) \div \left(2\frac{4}{9} \div 1\frac{7}{15} of \frac{3}{5}\right)}{\frac{1}{5} of \frac{1}{5} \div \frac{1}{125} – \frac{1}{25} \div \frac{1}{5} of \frac{1}{5}}$

=$\frac{\left(\frac{10}{9} \times \frac{21}{20} \div \frac{21}{38} – \frac{1}{3}\right) \div \left(\frac{22}{9} \div \frac{22}{25} \right)}{\frac{1}{25} \div \frac{1}{125} – \frac{1}{25} \div \frac{1}{25}}$

=$\frac{\left(\frac{10}{9} \times \frac{19}{10} – \frac{1}{3}\right) \div \left(\frac{25}{9} \right)}{5 – 1}$

=$\frac{\left(\frac{19}{9} – \frac{1}{3}\right) \div \left(\frac{25}{9} \right)}{4}$

=$\frac{\left(\frac{16}{9} \right) \times \left(\frac{9}{25} \right)}{4}$

= $\frac{4}{25}$ = 0.16

Question 10: In an office, $\frac{5}{8}$ of the total number of employees are males and the rest are females. $\frac{2}{5}$ of the number of males are non technical workers while $\frac{2}{3}$ of the number of females are technical workers, What fraction of the total number of employees are technical workers?

a) $\frac{5}{8}$

b) $\frac{2}{5}$

c) $\frac{1}{2}$

d) $\frac{3}{8}$

Solution:

Let the total number of employees be 8.

Total number of males employee = 8 $\times \frac{5}{8}$ = 5

Total number of females employee = 8 – 5 = 3

Non technical males workers = 5 $\times \frac{2}{5}$ = 2

Technical males workers = 5 – 2 = 3

Technical females workers = 3 $\times \frac{2}{3}$ = 2

total number of technical worker = 3 + 2 = 5

Fraction of the total number of technical workers = $\frac{total number of technical workers}{total number of employee} = \frac{5}{8}$

Question 11: a, b and c are three fractions such that a < b < c. If c is divided by a, the result is $\frac{9}{2}$, which exceeds b by $\frac{23}{6}$. The sum of a, b and c is $\frac{19}{12}$ , What is the value of (2a + b – c)?

a) $\frac{1}{2}$

b) $\frac{1}{3}$

c) $\frac{1}{12}$

d) $\frac{1}{4}$

Solution:

$\frac{c}{a} = \frac{9}{2}$

$c = \frac{9a}{2}$

b + $\frac{23}{6} = \frac{9}{2}$

b = $\frac{9}{2} – \frac{23}{6} = \frac{2}{3}$

a + b + c = 19/12

$a + \frac{2}{3} + \frac{9a}{2} = \frac{19}{2}$

$\frac{11a}{2} = \frac{19}{2} – \frac{2}{3}$

$\frac{11a}{2} = \frac{11}{12}$

a = $\frac{1}{6}$

$c = \frac{9}{2} \times \frac{1}{6} = \frac{3}{4}$

2a + b – c = $\frac{2}{6} + \frac{2}{3} – \frac{3}{4} = \frac{3}{12} = \frac{1}{4}$

Question 12: Three fractions $x, y$ and $z$  are such that $x > y > z$.When small of them divided by the greatest, the result is $\frac{9}{16}$, which exceeds $y$ by 0.0625.If $x + y + z = 1 \frac{13}{24}$,then the value of $x + z$ is

a) $\frac{7}{8}$

b) 1

c) $\frac{25}{24}$

d) $\frac{7}{6}$

Solution:

$\frac{z}{x} = \frac{9}{16}$
$\frac{9}{16} = y + 0.00625$
y = $\frac{1}{z}$
x + y + z = $1 \frac{13}{24}$
x + $\frac{1}{z} + z = \frac{37}{24}$
x + z = $\frac{37}{24} – \frac{12}{24} = \frac{25}{14}$

Question 13: Two-third of the number of employees of a companyare males andthe rest are females. If $\frac{3}{8}$ of the male employees and $\frac{2}{5}$ of the female employees are temporary employees and the total number of permanent employees is 740. then $\frac{7}{15}$ of the total number of employees exceeds the number of temporary female employees by:

a) 400

b) 340

c) 308

d) 320

Solution:

let the total employees be x.
Male employees = $\frac{2x}{3}$
Female employees = x – $\frac{2x}{3}$ = $\frac{x}{3}$
Permanent male employees = 1 – $\frac{3}{8}$ = $\frac{5}{8}$ of the male employee = $\frac{2x}{3} \times \frac{5}{8}$ = $\frac{5x}{12}$
Permanent female employees = 1 – $\frac{2}{5}$ = $\frac{3}{5}$ of the male employee = $\frac{x}{3} \times \frac{3}{5}$ = $\frac{x}{5}$
Total number of permanent employees = 740
$\frac{5x}{12}$ + $\frac{x}{5}$ = 740
$\frac{37x}{60}$ = 740
x = 740 $\times \frac{60}{37} = 1200$
$\frac{7}{15}$ of the total number of employees = 1200 $\times \frac{7}{15}$ = 560
Number of temporary female employees = $\frac{x}{3} \times \frac{2}{5}$ = $\frac{2x}{15}$
= $\frac{2 \times 1200}{15}$ = 160
$\frac{7}{15}$ of the total number of employees exceeds the number of temporary female employees by = 560 – 160 = 400

Question 14: If $\surd{33} = 5.745$, then the value of the following is approximately:
$\surd{\left(\frac{3}{11}\right)}$

a) 6.32

b) 2.035

c) 1

d) 0.5223

Solution:

Given, $\sqrt{33}=5.745$

$=$> $\sqrt{\frac{3}{11}}=\sqrt{\frac{3}{11}\times\frac{11}{11}}=\ \frac{\sqrt{33}}{11}=\ \frac{5.745}{11}=0.5223$

Question 15: Ali had ₹ 320. He spent $\frac{3}{4}$ of it to buy a watch. Of the remainder, he used $\frac{1}{8}$ of it to buy a pen. How much money is left?

a) 70

b) 120

c) 90

d) 100

Solution:

Money spent to buy a watch = $\frac{3}{4}\times320$ = ₹ 240

Remaining Amount = 320 – 240 = ₹ 80

Money spent to buy a pen = $\frac{1}{8}\times80$ = ₹ 10

$\therefore\$Money left with Ali after buying a watch and a pen = 320 – 240 -10 = ₹ 70

Hence, the correct answer is Option A

Question 16: Which one of the following is true?

a) $0 > \frac{7}{17} > \frac{3}{7} > \frac{3}{5}$

b) $0.5 < \frac{2}{3} < \frac{3}{4} < \left(\frac{16}{25}\right)^{0.5}$

c) $\frac{7}{24} > \frac{1}{3} > \frac{3}{8} > \frac{5}{12}$

d) $\frac{1}{2} > \frac{2}{3} > \frac{3}{4} > \frac{4}{5}$

Solution:

Option A

$0>\frac{7}{17}>\frac{3}{7}>\frac{3}{5}$

$=$> $0>\frac{7}{17}\times\frac{35}{35}\ >\frac{3}{7}\times\frac{85}{85}>\frac{3}{5}\times\frac{119}{119}$

$=$> $0>\frac{245}{525}\ >\frac{255}{525}>\frac{357}{525}$

Option B

$0.5<\frac{2}{3}<\frac{3}{4}<\left(\frac{16}{25}\right)^{0.5}$

$=$> $\frac{1}{2}<\frac{2}{3}<\frac{3}{4}<\frac{4}{5}$

$=$> $\frac{30}{60}<\frac{40}{60}<\frac{45}{60}<\frac{48}{60}$

Option C

$\frac{7}{24}>\frac{1}{3}>\frac{3}{8}>\frac{5}{12}$

$=$> $\frac{7}{24}>\frac{8}{24}>\frac{9}{24}>\frac{10}{24}$

Option D

$\frac{1}{2}>\frac{2}{3}>\frac{3}{4}>\frac{4}{5}$

$=$> $\frac{30}{60}>\frac{40}{60}>\frac{45}{60}>\frac{48}{60}$

Hence, the correct answer is Option B

Question 17: In an office, there are 216 tables and 264 chairs. If $\frac{1}{6}$ of the tables and $\frac{1}{4}$ of the chairs are broken then how many people can work in the office if each person requires one table and one chair?

a) 180

b) 186

c) 100

d) 198

Solution:

In an office, there are 216 tables and 264 chairs. If $\frac{1}{6}$ of the tables and $\frac{1}{4}$ of the chairs are broken.

Remaining tables = 216 of $(1-\frac{1}{6})$ = 216 of $\frac{5}{6}$ = 180

Remaining chairs = 264 of $(1-\frac{1}{4})$ = 264 of $\frac{3}{4}$ = 198

In question, it is given that each person requires one table and one chair to work in the office. There are 180 tables and 198 chairs remaining. So we can say that 180 people can work in the office.

Question 18: A fraction is such that the numerator is five less than the denominator. Also four times the numerator is one more than the denominator. The fraction is:

a) $\frac{4}{7}$

b) $\frac{3}{8}$

c) $\frac{7}{12}$

d) $\frac{2}{7}$

Solution:

Let’s assume the fraction is $\frac{P}{Q}$.
A fraction is such that the numerator is five less than the denominator.

P = Q-5

Q = P+5    Eq.(i)

Also four times the numerator is one more than the denominator.

4P = Q+1    Eq.(ii)

Put the value of ‘Q’ from Eq.(i) to Eq.(ii).

4P = P+5+1

4P-P = 6

3P = 6

P = 2

Put the value of ‘P’ in Eq.(i).

Q = P+5 = 2+5 = 7

fraction = $\frac{P}{Q}\ =\ \frac{2}{7}$

Question 19: The median of the given data $\frac{1}{2}, \frac{2}{7}, \frac{3}{4}, \frac{1}{3}, \frac{5}{8}$ is:

a) $\frac{3}{4}$

b) $\frac{1}{3}$

c) $\frac{2}{7}$

d) $\frac{1}{2}$

Solution:

Median is the middle term when the given data is arranged in ascending order from left to right.

Here the given data is in fraction. So first we need to take the LCM of the denominator.

LCM of (2, 7, 4, 3, 8) = 168
$\frac{1}{2} = \frac{84}{168}$

$\frac{2}{7} = \frac{48}{168}$

$\frac{3}{4} = \frac{126}{168}$

$\frac{1}{3} = \frac{56}{168}$

$\frac{5}{8} = \frac{105}{168}$

Now arrange the given data in ascending order.

$\frac{48}{168}$, $\frac{56}{168}$, $\frac{84}{168}$, $\frac{105}{168}$, $\frac{126}{168}$

So medium = 3rd term = $\frac{84}{168}$

= $\frac{1}{2}$

Question 20: What is the value of: $\frac{12 of 3 \div 6 + 12 \times 2 – (2 \times 4 – 5)}{12 \div 3 \times 4 + (2 \times 4 – 5)}$?

a) $\frac{27}{22}$

b) $\frac{23}{17}$

c) $\frac{27}{19}$

d) $\frac{21}{9}$

= $\frac{12\times\ \frac{3}{6}+24-(8-5)}{\frac{12}{3}\times4+(8-5)}$
= $\frac{6+24-3}{16+3}$
= $\frac{27}{19}$


text:
## User: Beginner

Beginner50
Reputation:
50
Status:
Trusted
Location:
Last seen:
2 months ago
Joined:
1 year, 1 month ago
Email:
V******************@yahoo.com

#### Posts by Beginner

<prev • 34 results • page 1 of 4 • next >
1
122
views
1
written 10 weeks ago by Beginner50
1
122
views
1
... I have a total of 8 samples, 4 controls and 4 Foxcut gene over expressed samples. I have a dataframe data with genes as rows and samples as columns with counts. The column data for all the 8 samples look like below with replicate and cell-line information: Samples TYPE ...
written 10 weeks ago by Beginner50 • updated 10 weeks ago by Aaron Lun24k
1
816
views
1
... I can actually get the gene lengths from the annotation gtf file. So, if I add that gene_length column to the matrix will it work? ...
written 9 months ago by Beginner50
1
816
views
1
...   I have raw counts data from featureCounts. I actually wanted to do survival analysis. For a specific gene I want to classify the samples into Low and High based on expression cutoff. For that I'm using maxstat package. First I would like to convert raw counts to FPKM. So, I did like following.  ...
written 9 months ago by Beginner50 • updated 9 months ago by Michael Love24k
1
767
views
1
... Thank you for the explanation !! ...
written 9 months ago by Beginner50
1
767
views
1
... Thanks a lot for the information. So, basically raw htseq counts with above mentioned voom function in the question gives logCPM values in negative and positive. Is logCPM values are normalized expression data? ...
written 9 months ago by Beginner50
1
767
views
1
... ok. I see. I'm little confused with this post [https://www.biostars.org/p/153013/#337075] The voom function I mentioned in the my question was taken from this link and applied on raw counts. They say that voom transformation and to normalise data the above mentioned function is used. But not aware w ...
written 9 months ago by Beginner50
1
767
views
1
... sorry that is not what I want. Anyways here. I see the answer to my question [https://support.bioconductor.org/p/63401/] But not aware about which normalisation method is applied with voom? Is it quantile normalisation? And is it applied across samples? ...
written 9 months ago by Beginner50
1
767
views
1
... Dear all, I'm using ht-seq raw counts RNA-seq data from TCGA. For Normalizing the data first I used voom() transformation and converted them to log-CPM values. I have used this voom function from Lima package to normalise data. t_index is the samples. The below function I got with some google sear ...
written 9 months ago by Beginner50 • updated 9 months ago by Ryan C. Thompson7.3k
2
340
views
2
... Hi James, I tried reading the methylation data with readTCGA. But it is not working. May be I'm wrong somewhere The methylation data is in a dataframe "df" with rows as probes and columns like Chromosome, Start position, End position, Gene and Samples like mentioned in my question.  library(minf ...
written 10 months ago by Beginner50

#### Latest awards to Beginner

Popular Question 9 months ago, created a question with more than 1,000 views. For scaling data for clustering heat map

Content
Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.


text:
# Oscillatory Motion

## What is Oscillatory Motion?

Oscillatory motion is defined as the to and fro motion of an object from its mean position. The ideal condition is that the object can be in oscillatory motion forever in the absence of friction but in the real world, this is not possible and the object has to settle into equilibrium.

To describe mechanical oscillation, the term vibration is used which is found in a swinging pendulum. Likewise, the beating of the human heart is an example of oscillation in dynamic systems.

## Examples of Oscillatory Motion

Following are the examples of oscillatory motion:

• Oscillation of simple pendulum
• Vibrating strings of musical instruments is a mechanical example of oscillatory motion
• Movement of spring
• Alternating current is an electrical example of oscillatory motion
• Series of oscillations are seen in cosmological model

### Simple Harmonic Motion

Simple harmonic motion (SHM) is a type of oscillatory motion which is defined for the particle moving along the straight line with an acceleration which is moving towards a fixed point on the line such that the magnitude is proportional to the distance from the fixed point.

For any simple mechanical harmonic system (system of the weight hung by the spring to the wall) that is displaced from its equilibrium position, a restoring force which obeys the Hooke’s law is required to restore the system back to equilibrium. Following is the mathematical representation of restoring force:

 $F=-kx$

Where,

• F is the restoring elastic force exerted by the spring (N)
• k is the spring constant (Nm-1)
• x is the displacement from equilibrium position (m)

### Difference between Oscillatory Motion and Periodic Motion

Periodic motion is defined as the motion that repeats itself after fixed intervals of time. This fixed interval of time is known as time period of the periodic motion. Examples of periodic motion are motion of hands of the clock, motion of planets around the sun etc.

Oscillatory motion is defined as the to and fro motion of the body about its fixed position. Oscillatory motion is a type of periodic motion. Examples of oscillatory motion are vibrating strings, swinging of the swing etc.

1. SANJAY LAWA

motion of eatrh arround the sun is it oscillatory motion or shm

1. The motion of the Earth around the sun is neither an oscillatory motion nor a simple harmonic motion as the motion is not a to and fro motion about a mean position.

1. Aftab khan

motion of Earth around the sun is periodic motion.

2. sushmitha

The motion of the earth around the sun is an example of planetary motion. Also, there are three laws associated with the planetary motion and these laws are known as Kepler’s laws.

2. Your teaching is very beautiful and understanding


text: Click the blue arrow to submit. Type in any integral to get the solution, steps and graph. Some are very similar to others. The calculator will evaluate the definite (i.e. In general, you can skip parentheses, but You can also check your answers! Enter the function you want to integrate into the editor. Not to mention their servers gave up the ghost turned into Zombies on 25 March 2015 (Brains! Integral Calculator. Table of integrals - the basic formulas of indefinite integrals. Topics in this section [Rational, Irrational, Exponential & Logarithmic Functions] [Trigonometric Functions] [Hyperbolic & Inverse Hyperbolic Functions] Trigonometry Calculator. In contrast to derivatives there are no ready-made formulas that can calculate the integral of any function in routine way.In general, integration requires more sophisticated methods adapted to the specific problem. "1 (8)!x(x+a)ndx= (x+a)1+n(nx+x"a) (n+2)(n+1) (9) dx!1+x2 =tan"1x (10) dx!a2+x2 = 1 a tan"1(x/a) (11) xdx!a2+x2 = 1 2 ln(a2+x2) (12) x2dx!a2+x2 â¦ The clustrmap is periodically (and automatically) archived and its counters reset, so the total is smaller. You can also get a better visual and understanding of the function and â¦ You can also get a better visual and understanding of the function and area under the curve using our graphing tool. In case you have any suggestion, please do not hesitate to contact us. In general, you can skip the multiplication sign, so 5 x is equivalent to 5 â x. Calculating integrals manually needs proper understanding and practice. Integral by parts calculator makes it easy to solve integral equations online. Table of Integrals BASIC FORMS (1)!xndx= 1 n+1 xn+1 (2) 1 x!dx=lnx (3)!udv=uv"!vdu (4) "u(x)v!(x)dx=u(x)v(x)#"v(x)u! Free integral calculator - solve indefinite, definite and multiple integrals with all the steps. Table of Integrals. This website uses cookies to ensure you get the best experience. Example: Proper and improper integrals. Testing the limited values of inner integral and integrate. Matrix Inverse Calculator; What are integrals? Show Instructions. Please ensure that your password is at least 8 characters and contains each of the following: You'll be able to enter math problems once our session is over. In general, you can skip the multiplication sign, so 5 x is equivalent to 5 â x. Table of Standard Integrals 1. If you have a table of values, see trapezoidal rule calculator for a table. Use a calculator or computer to make a table of values of left and right Riemann sums $L_n$ and $R_n$ for the integral $\displaystyle \int^2_0 e^{-x^2} \, dx$ with $n$ = 5, 10, 50, and 100. The Integral Calculator solves an indefinite integral of a function. with bounds) integral, including improper, with steps shown. An even larger, multivolume table is the Integrals and Series by Prudnikov, Brychkov, and Marichev (with volumes 1â3 listing integrals and series of elementary and special functions, volume 4â5 are tables of Laplace transforms). ... Definite integrals; Functions formulas; Indefinite integrals; Integration formulas; Limits and Derivatives; Series formulas; GENERAL (Of course, use a computer to do integrals whenever you can!) For definite integral, see definite integral calculator.. Integrals with Trigonometric Functions (71) Z sinaxdx= 1 a cosax (72) Z sin2 axdx= x 2 sin2ax 4a (73) Z sin3 axdx= 3cosax 4a + cos3ax 12a (74) Z sinn axdx= 1 a cosax 2F 1 1 2; 1 n 2; 3 2;cos2 ax (75) Z cosaxdx= 1 a sinax (76) Z cos2 axdx= x 2 + sin2ax 4a (77) Z cos3 axdx= 3sinax 4a + sin3ax 12a 8 After getting the integrated value, begin combining â¦ show help ââ examples ââ ^-+ * / ^. x+Ð¡ . Z cosxdx= sinx+C 6. Mean value theorem. Trigonometric integrals Calculator online with solution and steps. (x+a)ndx=(x+a)n a 1+n + x 1+n " #$% &', n! Please write without any differentials such as dx, dy etc. When f (x) is continuous there is a point so . The Integral Calculator supports definite and indefinite integrals (antiderivatives) as well as integrating functions with many variables. Step 1: Enter the function you want to integrate into the editor. Z secxdx= ln secx+tanx +C 12. In case you have any suggestion, or if you would like to report a broken solver/calculator, please do not hesitate to contact us. Integral Approximation Calculator. Points to note: It's very important to understand the substitutions u and du (which is the case for most integrations) Make sure you use the correct formula!! (Use C for the constant of integration. Between what two numbers must the value of the integral lie? The Integral Calculator solves an indefinite integral of a function. Double Integral Calculator is a free online tool that displays the value for the double integral function. Show Instructions In general, you can skip the multiplication sign, so 5x is equivalent to 5*x. The indefinite integral of , denoted , is defined to be the antiderivative of . Calculus. Integral Calculator. Free indefinite integral calculator - solve indefinite integrals with all the steps. If F\left(x\right) is an antiderivative of f\left(x\right), then the set of all antiderivatives of f\left(x\right) is given by F\left(x\right)+C. Integral Calculator. Note: use your eyes and common sense when using this! Integrals Table . Use the table of integrals, or a computer or calculator with symbolic integration capabilities, to find the indefinite integral. Z dx a 2+x = 1 a tan 1 x a +C 9. sec2 xdx= tanx+C 10. This method of calculation is used in our Coplanar Waveguide With Ground Calculator and the equations used are shown below. The premium integral involves the limited values of x and the next integral involves the limited values of y. A complete table of integrals divided by categories. Solved exercises of Trigonometric integrals. Indefinite integral of the given function is called the set of all its antiderivatives: . The integration by parts calculator is simple and easy to use. Functions: What They Are and How to Deal with Them, Normal Probability Calculator for Sampling Distributions. Definite Integral Properties when . Z cosecxdx= ln cosecx cotx +C 13. How to use Integral Calculator with steps? Calculus Calculator. Trigonometric Expression Evaluator Negative Predictive Value Calculator Elliptical Integrals of the First Kind Calculator This calculator finds the elliptical integral K(k) and shows each successive step until the final result is obtained. The calculator will approximate the integral using the trapezoidal rule, with steps shown. As an arbitrary integration constant, the number C, which can be determined if the value of the integral is known at some point.Each function has an infinite number of antiderivatives. Change of Integration Variable. Get more help from Chegg. On this page, the tables contain examples of the most common integrals. We'll assume you're ok with this, but you can opt-out if you wish. Basic Integrals; Trigonometric Integrals; Exponential and Logarithmic Integrals; Hyperbolic Integrals; Inverse Trigonometric Integrals; Integrals Involving a2 + u2, a > 0; Integrals Involving u2 â a2, a > 0; Integrals Involving a2 â u2, a > 0; Integrals Involving 2au â u2, a > 0; Integrals â¦ There have been visitors to integral-table.com since 2004. Mathway requires javascript and a modern browser. Detailed step by step solutions to your Trigonometric integrals problems online with our math solver and calculator. Use this tool to find the approximate area from a curve to the x axis. When . When , and . This calculator computes the definite and indefinite integrals (antiderivative) of a function with respect to a variable x. ) A lot of the integrals in this section can easily be done using a Table of Integrals. By using this website, you agree to our Cookie Policy. This website uses cookies to ensure you get the best experience on our website. Some curves don't work well, for example tan(x), 1/x near 0, â¦ Z cotxdx= ln sinx +C 8. This website uses cookies to improve your experience. September 25, 2013 Categories: FORMULAS, Indefinite integrals, Integration formulas by Calculatorium 0 Comments. Integration by parts formula: ?udv=uv-?vdu. Z dx x = lnjxj+C 3. If the integral hasn't been calculated or it took too much time, please write it in comments. In order to calculate indefinite integral of the given function, one need to use integral table and integration rules or use our free online calculator.. Calculator is able to find step by step solution for many types of the integrals. Since the derivative of a constant is 0, indefinite integrals â¦ The solution received, contains description of the every step. Type in any integral to get the solution, steps and graph This website uses cookies to ensure you get the best experience. Formulas: - Basic Integration Formulas - Integrals of the rational functions of part - Integrals of transcendental functions - Integrals of the irrational functions of part - Integrals of trigonometric functions of part - Property of indeterminate integrals - Properties of the Definite Integral An Integral Calculator is a free online tool that displays the antiderivative of the given function. Be patient! Print ... Table of integrals for all kinds of functions including the most commonly used definite integrals formulas. + 13 Click here to view page 1 of the table of integrals, Click here to view page 2 of the table of integrals. Interactive graphs/plots help visualize and better understand the functions. If you have a table of values, see trapezoidal rule calculator for a table. Use the Table of Integrals to find the integral. The calculator will approximate the integral using the trapezoidal rule, with steps shown. Z xn dx= xn+1 n+1 +C (n6= 1) 2. When , , , Integration By Parts. Table shows indefinite integrals (antiderivative) of selected functions. Degrees of Freedom Calculator Paired Samples, Degrees of Freedom Calculator Two Samples. Some integrals may take much time. Read Integral Approximations to learn more.. Z e xdx= e +C 4. Choose "Evaluate the Integral" from the topic selector and click to see the result! Double integral calculator mostly utilized to count the two-dimensional figures. Integration is an important tool in calculus that can give an antiderivative or represent area under a curve. Show Instructions. Definite Integral Calculation. BYJUâS online double integral calculator tool makes the calculation faster, and it displays the double integral value in a fraction of seconds. Search BYJUâS online integral calculator tool makes the calculations faster, showing the integral value for the given function in a fraction of seconds. Z tanxdx= ln cosx +C 7. â Preview: Input function: ? ... Find the integral of 1 using the table of common integrals rule \int a\mathrm{d}x=ax. Percentage Calculator Email . The steps include: Looking at the presented function and limits. Example: A definite integral of the function f (x) on the interval [a; b] is the limit of integral sums when the diameter of the partitioning tends to zero if it exists independently of the partition and choice of points inside the elementary segments.. Integration â is one of the main mathematical operations. For more about how to use the Integral Calculator, go to "Help" or take a look at the examples. Z cosec2 xdx= cotx+C 11. In other words, the derivative of is . Definite Integral Definition . (x)dx RATIONAL FUNCTIONS (5) 1 ax+b!dx= 1 a ln(ax+b) (6) 1 (x+a)2!dx= "1 x+a (7)! It includes the rules and basic formulas of integration, exponential, logarithmic, trigonometric, rational and irrational fuciones ... etc. Remember to use absolute values where appropriate.) Step-by-Step Examples. Integral calculator is an online tool used for evaluating integrals online. Z sinxdx= cosx+C 5. In case you have any suggestion, or if you would like to report a broken solver/calculator, please do not hesitate to contact us. The solution, steps and graph this website uses cookies to ensure get..., showing the integral calculator supports definite and indefinite integrals with all steps... 5 x is equivalent to  5 * x  up the turned! Is one of the given function, indefinite integrals ( antiderivative ) of a.! N+1 +C ( n6= 1 ) 2 and irrational fuciones... etc can give an antiderivative or represent area the! Your eyes and common sense when using this website, you can opt-out if you have any,... Calculator will approximate the integral using the trapezoidal rule calculator for a table step 1 Enter... Can opt-out if you have a table of values, see trapezoidal rule calculator for a table of values see! The approximate area from a curve to the x axis with all the steps write without any differentials such . Divided by Categories our math solver and calculator  is equivalent to  5 * x , the contain... Free integral calculator is a point so steps shown to do integrals you! When f ( x ) is continuous there is a point so a lot of the every step to. Integration, exponential, logarithmic, trigonometric, rational and irrational fuciones etc! And indefinite integrals, integration formulas by Calculatorium 0 comments with respect to a variable.. An indefinite integral of the most commonly used definite integrals formulas get the,. Help visualize and better understand the functions with solution and steps and steps integration is an tool! Integral lie xn+1 n+1 +C ( n6= 1 ) 2 1: Enter the function you to. For all kinds of functions including the most commonly used definite integrals formulas us. X axis kinds of functions including the most commonly used definite integrals formulas next! Choose  Evaluate the integral lie description of the integral '' from topic. Is called the set of all its antiderivatives:: Enter the function and.. * x  shown below #$ % & ', n section can easily be done using table... Main mathematical operations the antiderivative of the given function in a fraction of.! Not hesitate to contact us our Cookie Policy premium integral involves the limited values of.... This page, the tables contain examples of the every step in case have! In our Coplanar Waveguide with Ground calculator and the next integral involves the limited of. But you can skip parentheses, but a complete table of values, see trapezoidal calculator. Are shown below with bounds ) integral, including improper, with steps shown calculator tool makes calculations!  help '' or take a look at the presented function and area under the using... Involves the limited values of inner integral and integrate examples of the function! Use the integral calculator, go to ` help '' or take look... Please do not hesitate to contact us... find the indefinite integral of the given.... Tool used for evaluating integrals online formula:? udv=uv-? vdu n+1! Xn+1 n+1 +C ( n6= 1 ) 2 a\mathrm { d } x=ax calculator! ) integral, including improper, with steps shown so the total smaller!, integration formulas by Calculatorium 0 comments online tool used for evaluating integrals..