text:
## Schedule

All events will be held via Zoom, and the schedules below are in Central Time.

 Sun 6/28 Mon 6/29 Tues 6/30 Wed 7/1 Thurs 7/2 Fri 7/3 10:00 - 10:30 Office Hours Reading Day Office Hours Reading Day Office Hours 10:40 - 11:10 Mini-Course A.1 Mini-Course A.1* This lecture starts 15 minutes early: 10:25 - 10:55 Mini-Course A.1 11:30 - 12:00 Mini-Course B.1 Mini-Course B.1 Mini-Course B.1 12:00 - 02:00 Lunch Lunch Lunch 02:00 - 02:30 Mini-Course A.2 Mini-Course A.2 Mini-Course A.2 02:50 - 03:20 Orientation (03:00 - 05:00) Mini-Course B.2 Discussion: Imposter Syndrome and Implicit Bias (03:00 - 05:00) Mini-Course B.2 Discussion: Navigating Graduate School (03:00 - 05:00) Mini-Course B.2 03:40 - 04:40 Group Problem Session Group Problem Session Group Problem Session 04:40 - 05:10 Office Hours Office Hours Office Hours
 Mon 7/6 Tues 7/7 Wed 7/8 Thurs 7/9 Fri 7/10 09:30 - 10:30 Office Hours Reading Day Office Hours Reading Day Office Hours 10:30 - 11:10 Mini-Course A.1 Mini-Course A.1 Mini-Course A.1 11:30 - 12:10 Mini-Course B.1 Mini-Course B.1 Mini-Course B.1 12:30 - 01:50 Lunch Lunch Lunch 01:50 - 02:30 Mini-Course A.2 Mini-Course A.2 Mini-Course A.2 02:50 - 03:30 Mini-Course B.2 Career Panel (03:00 - 05:00) Mini-Course B.2 Mini-Course B.2 04:00 - 05:00 Group Problem Session Group Problem Session Group Problem Session 05:00 - 05:30 Office Hours Office Hours Office Hours
 Mon 7/13 Tues 7/14 Wed 7/15 Thurs 7/16 Fri 7/17 09:30 - 10:30 Office Hours Office Hours Office Hours 10:30 - 11:10 Mini-Course A Mini-Course A Mini-Course A 11:30 - 12:10 Mini-Course B Mini-Course B Mini-Course B 12:30 - 02:00 Lunch Lunch Lunch 02:00 - 02:50 Michael Brannan Mark Tomforde Lauren Ruth Robin Deeley Isaac Goldbring 03:00 - 03:50 Group Problem Session 04:00 - 04:50 Dawn Archey Ian Charlesworth Nate Brown Corey Jones Sam Kim 05:00 - 05:30 Office Hours
 10:00 - 10:50 11:30 - 12:20 12:30 - 02:00 02:00 - 02:50 03:30 - 04:20 05:00 - 05:50 Sat 7/18 Dimitri Shlyakhtenko Sarah Reznikoff Lunch Emily Peters Rufus Willett Ben Hayes Sun 7/19 José Carrión Ionut Chifan Lunch Matt Kennedy

## Expository Talks

Michael Brannan Quantum groups: What are they and what are they good for?

I will give a light introduction to the theory of compact quantum groups from the operator algebraic perspective. I will highlight some aspects of their general theory (representation theory, Haar states, related operator algebras) as well as several concrete examples. Time permitting, I will also point out some recent applications of quantum groups in combinatorics and quantum information theory. Slides

Dawn Archey A Crash Course in Crossed Product C*-Algebras

We will briefly describe the construction of a crossed product $C^*$-Algebra from an action of a group $G$ on a $C^*$-algebra $A$. We will provide a few examples. Then we will look in more detail at the situation when $G= \mathbb{Z}$ and the situation when $G$ is a finite group. Samples of the many known theorems will be given. We will conclude with some current research on crossed products and large subalgebras. Slides

Mark Tomforde K-theory: An Elementary Introduction

K-theory is a generalized homology in which one associates abelian groups to a C*-algebra. While K-theory provides some of the most important and useful invariants for C*-algebras, it is also notoriously technical. Simply defining the abelian groups can be cumbersome and involves a lot of machinery. Furthermore, K-theory is motivated by and has applications to a vast number of topics (e.g., topology, geometry, index theory, classification of C*-algebras), all of which can easily cause newcomers to get mired in details and lose track of the forest in the trees. In this talk we shall present a bird’s eye view of K-theory, including a descriptive walk-through of the definitions of the K-groups and how to use them. Throughout, we will discuss the origins and motivations for K-theory, explain how it relates to other subjects, examine some of its most useful properties, and present the major C*-algebraic results that is has provided. Slides

Ian Charlesworth Free Probability

The algebra $L^\infty(\Omega, \mathbb{P})$ of essentially bounded random variables on some probability space is a (commutative) von Neumann algebra with a state given by the conditional expectation; it is tempting, then, to think of an arbitrary von Neumann algebra as an algebra of non-commutative random variables. This approach is free probability. Many results and techniques from probability theory have analogues in operator algebras, including the free central limit theorem and free information theory. These results are an analogue of their classical versions, though, not extensions, and it is necessary to introduce a new notion of independence suited to the non-commutative world. I will give an introduction to free probability theory, discuss the dictionary between it and "classical" probability theory, and spend some time proving the free central limit theorem, before closing with some brief remarks about how free probability can be used to establish structural properties of von Neumann algebras. Slides

Lauren Ruth Operator algebras and equivalences between groups

We have various ways of describing the extent to which two countably infinite groups are "the same." Are they isomorphic? If not, are they commensurable? Measure equivalent? Quasi-isometric? Orbit equivalent? W*-equivalent? Von Neumann equivalent? In this expository talk, we will define these notions of equivalence, discuss the known relationships between them, and work out some examples.

Nate Brown Duality as the bridge between C*- and W*-algebras

Some of the most important results in C*-algebra theory depend on the theory of von Neumann algebras, aka W*-algebras. In this talk I'll describe the abstract connection between C*- and W*-algebras, which depends on the theory of duality in Banach spaces. Specifically, the double dual of every C*-algebra is a von Neumann algebra. I will describe this duality in detail, then give a tour of very useful applications. Slides

Robin Deeley Groupoid C*-algebras

I will introduce groupoid C*-algebras using examples and a process that I informally call the C*-game. I will emphasize the special case of etale equivalence relations and C*-algebraic constructions coming from dynamical systems. The overall goal is to convince the audience that groupoids give not only a very general way of constructing C*-algebras but are also a useful tool in the study of C*-algebras in general. Slides

Corey Jones Subfactors and quantum symmetries

A subfactor is an inclusion of $\rm{II}_{1}$ factors $N\subseteq M$. The generalized symmetries of this inclusion are captured by an incredibly rich mathematical structure called the standard invariant, which has connections with a wide range of topics in mathematics and physics from low dimensional topology to quantum field theory. We will give a gentle introduction to these concepts, and explain some open problems in this area. Slides

Isaac Goldbring Model theory and von Neumann algebras

Model theorists study mathematical structures through the lens of first-order logic. The model theoretic study of von Neumann algebras is quite new and has been expanding at a rapid pace, producing applications to purely operator algebraic problems as well as raising interesting model theoretic questions. In this talk I will give a survey of some of these results, the focus being on how this perspective sheds light on questions around ultraproducts of tracial von Neumann algebras. Slides

Sam Kim An introduction to Operator Systems

An operator system is a unital subspace of $B(H)$ that is closed under the involution operation $*$. This talk will introduce some basic results on operator systems and their connection to C*-algebras. Our end goal will be to describe some operator systems that seem tame but demonstrate some surprisingly complex behaviour. Slides

## Culminating Workshop

Dimitri Shlyakhtenko Interpolated free group factors

We review the Dykema-Radulescu notion of interpolated free group factors. We also discuss our recent work with Sorin Popa showing that all such factors are group von Neumann algebras. Slides

Sarah Reznikoff A short survey of graph algebras and related notions

C*-algebras constructed from directed graphs form a class of operator algebras that can be analyzed by examining the combinatorics of the underlying graph. We will go over the basic notions of graph algebras, survey some major results in the field and see some connections between these algebras and groupoids algebras. Slides

Emily Peters Planar algebras and subfactors

Planar algebras are an algebraic (even categorical) way to look at the standard invariant of a subfactor. In this talk we'll explore why subfactors have diagrammatic operations, and constructing subfactors via their planar algebras.

Rufus Willett Almost commuting matrices and Bott periodicity

Let u and v be two unitary matrices that almost commute, meaning the commutator uv-vu is small. Must there be nearby unitary matrices that actually commute?
The question has several interesting precise versions, and the answer is ‘depends on the version’. For example, Voiculescu showed that if ‘small’ and ‘nearby’ are measured by the operator norm, and if the implicit constants are wanted independent of dimension, the answer is ‘no'.
I’ll start by explaining the close relation between Voiculescu’s (counter-)example and the Bott periodicity theorem from operator K-theory. I’ll then touch on connections to index theory and representation theory, among other things. Slides

Ben Hayes Free probability, random matrices, and 1-bounded entropy

I will start by discussing Voiculescu's asymptotic freeness theorem, a general result which gives a natural way in which freely independent noncommutative variables arise from random matrices. I will then use this as motivation to discuss the notion of 1-bounded entropy, an invariant for von Neumann algebras which arises out of an attempt to "count" how many matricial approximations a von Neumann algebras. I will discuss applications to structural results of free group factors. Time permitting, I may even discuss some of my results. Slides

José Carrión Classifying nuclear C*-algebras (a brief look)

Can K-theory (and related gadgets) tell you when two C*-algebras are isomorphic? In this expository talk I'll give a gentle introduction to the classification theory for nuclear C*-algebras, starting with the case of AF algebras, and present some recurring themes found in research being carried out in the field today. Slides

Ionut Chifan Rigidity in group von Neumann algebras

In the the mid thirties F. J. Murray and J. von Neumann found a natural way to associate a von Neumann algebra L(G) to every countable discrete group G. Classifying L(G) in terms of G emerged as a natural yet quite challenging problem as these algebras tend to have very limited “memory” of the underlying group. This is perhaps best illustrated by Connes’ famous result asserting that all icc amenable groups give rise to isomorphic von Neumann algebras; thus in this case, besides amenability, the algebra has no recollection of the usual group invariants like torsion, rank, or generators and relations. In the non-amenable case the situation is radically different; many examples where the von Neumann algebraic structure is sensitive to various algebraic group properties have been discovered via Popa’s deformation/rigidity theory.
In my talk I will focus on an extreme situation, namely when L(G) completely remembers the underlying group G; such groups G are called W*-superrigid. Currently there have been identified only two type of group theoretic constructions that lead to W*-superrigid groups: some classes of generalized wreath products groups with abelian base (Ioana-Popa -Vaes '10) and amalgamated free products (Chifan-Ioana '16). After briefly surveying these results I will introduce several new constructions of W*-superrigid groups which include direct product groups, semidirect products with non-amenable core, and tree groups (iterations of amalgams and HNN-extensions). In addition, I will present several applications of these results to the study of rigidity in the C*-setting. This is based on a very recent joint work with Alec Diaz-Arias and Daniel Drimbe. Slides

Matt Kennedy The algebraic structure of C*-algebras associated to groups

Since the work of von Neumann, the theory of operator algebras has been closely linked to the theory of groups. On the one hand, operator algebras constructed from groups provide an important source of examples and insight. On the other hand, many problems about groups are most naturally studied within an operator-algebraic framework. In this talk I will give an overview of some problems relating the structure of a group to the structure of a corresponding C*-algebra. I will discuss recent results and some possible future directions. Slides


text:
# Can someone help me with this question ? i cant find the derivatives or the others !! someone help me please ?

Apr 3, 2018

#### Explanation:

.

.

$y = x {e}^{- 2 x}$

Let's take the derivative of the function using the Product Rule:

$\frac{\mathrm{dy}}{\mathrm{dx}} = - 2 x {e}^{- 2 x} + {e}^{- 2 x}$

We set this derivative equal to $0$ and solve for $x$:

$- 2 x {e}^{- 2 x} + {e}^{- 2 x} = 0$

${e}^{- 2 x} \left(- 2 x + 1\right) = 0$

${e}^{- 2 x} = 0 , \therefore \frac{1}{e} ^ \left(2 x\right) = 0 , \therefore {e}^{2 x} = \infty , \therefore x = \infty$

$- 2 x + 1 = 0 , \therefore 2 x = 1 , \therefore x = \frac{1}{2}$

$x = \infty$ is not a maximum for the function.

$x = \frac{1}{2}$ can be either a maximum or a minimum.

Let's find the $y$ coordinate for this point:

$y = x {e}^{- 2 x} = \frac{1}{2} {e}^{- 2 \left(\frac{1}{2}\right)} = \frac{1}{2} {e}^{- 1} = \frac{1}{2} \cdot \frac{1}{e} = \frac{1}{2 e}$

The point has the coordinates of $\left(\frac{1}{2} , \frac{1}{2 e}\right)$ or $\left(0.5 , 0.18\right)$

To find out whether the function is increasing or decreasing before and after this point, we use the derivative. We know that the slope of the tangent line to any curve at a specific point can be found by plugging the $x$ coordinate of the point into the derivative function.

If the result is positive the tangent line has a positive slope $\left(m\right)$ which means the function is increasing at that point (on the rise). If it is negative the function is decreasing at that point.

Let's test a point with the $x$-coordinate of $\frac{1}{4}$ which is smaller than $\frac{1}{2}$:

$\frac{\mathrm{dy}}{\mathrm{dx}} = m = {e}^{- 2 x} \left(- 2 x + 1\right) = {e}^{- 2 \left(\frac{1}{4}\right)} \left(- 2 \left(\frac{1}{4}\right) + 1\right) = {e}^{- \frac{1}{2}} \left(- \frac{1}{2} + 1\right) = \frac{1}{e} ^ \left(\frac{1}{2}\right) \cdot \frac{1}{2} = 0.607 \cdot 0.5 = 0.3035$ a positive value

Now, let's try a point with the $x$-coordinate of $1$ which is larger than $\frac{1}{2}$:

$\frac{\mathrm{dy}}{\mathrm{dx}} = m = {e}^{- 2 \left(1\right)} \left(- 2 \left(1\right) + 1\right) = {e}^{- 2} \left(- 1\right) = - \frac{1}{e} ^ 2 = - 0.1353$ a negative value

This indicates that the point $\left(0.5 , 0.18\right)$ is a maximum because the function is increasing before it and decreasing after it.

And because we only have this one critical point, we can determine that the function is increasing when:

$- \infty < x < 0.5$

And it is decreasing when:

$0.5 < x < \infty$

Let's take the second derivative of the function:

$\frac{{d}^{2} y}{{\mathrm{dx}}^{2}} = - 2 \left(- 2 x {e}^{- 2 x} + {e}^{- 2 x}\right) - 2 {e}^{- 2 x} = 4 x {e}^{- 2 x} - 2 {e}^{- 2 x} - 2 {e}^{- 2 x} = 4 x {e}^{- 2 x} - 4 {e}^{- 2 x}$

$\frac{{d}^{2} y}{{\mathrm{dx}}^{2}} = 4 {e}^{- 2 x} \left(x - 1\right)$

We set this second derivative equal to $0$ and solve for $x$ to find the inflection point:

$4 {e}^{- 2 x} \left(x - 1\right) = 0$

${e}^{- 2 x} = 0 , \therefore \frac{1}{e} ^ \left(2 x\right) = 0 , \therefore {e}^{2 x} = \infty , \therefore x = \infty$ this is not a valid inflection point.

$x - 1 = 0 , \therefore x = 1$

Let's plug this into the function to find its $y$:

$y = x {e}^{- 2 x} = \left(1\right) {e}^{\left(- 2\right) \left(1\right)} = {e}^{- 2} = \frac{1}{e} ^ 2 = 0.13$

$\left(1 , 0.13\right)$ is the inflection point.

Now, we can perform the second derivative test to determine concavity. We will test an $x$ value smaller and one larger than $1$:

$x = 0.9 , \therefore \frac{{d}^{2} y}{{\mathrm{dx}}^{2}} = 4 {e}^{- 1.8} \left(0.9 - 1\right) = - 0.066$

$x = 1.1 , \therefore \frac{{d}^{2} y}{{\mathrm{dx}}^{2}} = 4 {e}^{- 2.2} \left(1.1 - 1\right) = 0.044$

This means the curve is concave up when:

$- \infty < x < 1$

And it is concave down when:

$1 < x < \infty$

There is no relative minimum or relative maximum. The maximum point we found is the absolute maximum. There is no absolute minimum either.

We set $x = 0$ to find the $y$-intercept:

$x = 0 , \therefore y = x {e}^{- 2 x} = 0$

$\left(0 , 0\right)$ is the $y$-intercept:

We set $y = 0$ to find the $x$-intercept:

$y = 0 , \therefore x = 0 , \mathmr{and} {e}^{- 2 x} = 0 , \therefore \frac{1}{e} ^ \left(2 x\right) = 0 , \therefore {e}^{2 x} = \infty , \therefore x = \infty$

$\left(0 , 0\right)$ is the $x$-intercept.

$x = \infty$ when $y = 0$ indicates that the $x$-axis is the horizontal asymptote of the function.

$L i {m}_{x \to + \infty} x {e}^{- 2 x} = L i {m}_{x \to + \infty} x \cdot \frac{1}{e} ^ \left(2 x\right) = \infty \cdot \frac{1}{\infty} = \infty \cdot 0 = 0$

$L i {m}_{x \to - \infty} x {e}^{- 2 x} = - \infty \cdot + \infty = - \infty$

The graph of the function is:

format: plain


text:
#!/usr/bin/env python3

import warnings

import torch

from ..lazy import RootLazyTensor
from ..module import Module
from ._variational_strategy import _VariationalStrategy

"""
:obj:~gpytorch.variational.VariationalStrategy to produce vector-valued (multi-task)
output distributions. Each task will be independent of one another.

The output will either be a :obj:~gpytorch.distributions.MultitaskMultivariateNormal distribution
(if we wish to evaluate all tasks for each input) or a :obj:~gpytorch.distributions.MultivariateNormal
(if we wish to evaluate a single task for each input).

The base variational strategy is assumed to operate on a batch of GPs. One of the batch
dimensions corresponds to the multiple tasks.

:param ~gpytorch.variational.VariationalStrategy base_variational_strategy: Base variational strategy
:param int num_tasks: Number of tasks. Should correspond to the batch size of :attr:task_dim.
:param int task_dim: (Default: -1) Which batch dimension is the task dimension
"""

Module.__init__(self)
self.base_variational_strategy = base_variational_strategy

@property
def prior_distribution(self):
return self.base_variational_strategy.prior_distribution

@property
def variational_distribution(self):
return self.base_variational_strategy.variational_distribution

@property
def variational_params_initialized(self):
return self.base_variational_strategy.variational_params_initialized

def kl_divergence(self):
return super().kl_divergence().sum(dim=-1)

[docs]    def __call__(self, x, task_indices=None, prior=False, **kwargs):
r"""
See :class:LMCVariationalStrategy.
"""
function_dist = self.base_variational_strategy(x, prior=prior, **kwargs)

# Every data point will get an output for each task
if (
and self.task_dim + len(function_dist.batch_shape) < 0
):
else:
return function_dist

else:
# Each data point will get a single output corresponding to a single task

num_batch = len(function_dist.batch_shape)

shape = list(function_dist.batch_shape + function_dist.event_shape)

return MultivariateNormal(mean, covar)

"""
:obj:~gpytorch.variational.VariationalStrategy
to produce a :obj:~gpytorch.variational.MultitaskMultivariateNormal distribution.
All outputs will be independent of one another.

The base variational strategy is assumed to operate on a batch of GPs. One of the batch
dimensions corresponds to the multiple tasks.

:param ~gpytorch.variational.VariationalStrategy base_variational_strategy: Base variational strategy
:param int num_tasks: Number of tasks. Should correspond to the batch size of :attr:task_dim.
:param int task_dim: (Default: -1) Which batch dimension is the task dimension
"""


text:
JeT
**My (open) question**

How can I extend the benefits of pgfkeys to store and resuse formulae ?

**Context**

So many long formuale I use again and again... I saw many advantages to store my formulae in pgfkeys:

- It simplifies typing (e.g. \RF[delta]), especially when long formulae got to be in a table.
- it avoids the multiplication of \def (I get lost after 100 macros with weirder and longer names to remember).
- One can use numbers (e.g. \RF[d1])
- One centralizes the format and thus one can check the consistency of notations.
- as a result, one avoid discrepancies in typing of the formulae between different documents.
- Could be useful for index, labelling/cross referencing, nomenclatures
- ... probably many other thing (I've not thought about yet...)

**Where do I stand ?**

So far I have a simple working (storing) solution (see MWE below).

**Where do I need insight ?**

If you had to think about the equations you keep using, How would you see a smart way to centralize information you'll need about these equations ? And reuse it efficiently.

I bascally use /.initial but there must be other keys to do the job better (list ?).

PS : Probably related to [this great answer](https://topanswers.xyz/tex?q=1557) since I intend to draw or calculate values for these equations at some point.

**Example of applications I have in mind**

\documentclass{article}

\usepackage{tikz}
\usepackage{mathtools}

% I used long formulae on purpose
\pgfkeys{
formula/.is family,
formula,
spot/.initial		= { S },
today/.initial	= { t_0 },
maturity/.initial	= { T },
TTM/.initial		= { T-t },
abm/.initial		= { {S_{t}=S_{0}+\mu t+\sigma W_{t}} },
gmb/.initial		= { \mu=\mathbb{E}(R_{t})=\mathbb{E}\left[\frac{dS_{t}}{S_{t}}\right] },
forward/.initial	= { F =\displaystyle Se^{rt}},
forward div repo/.initial	= { F_T = S_0 e^{(r-\text{div}-\text{repo})\times T} },
delta/.initial	= { \mathcal{N}\left(\frac{\ln \frac{F}{K} +\frac{1}{2}\sigma^2T}{\sigma \sqrt{T}}\right)  },
d1/.initial		= { d_1 = \displaystyle \frac{\ln\frac{S}{K} + (r + \frac{\sigma^2}{2})T}{\sigma \sqrt{T}}},
d2/.initial		= { d_2 = \displaystyle \frac{\ln\frac{S}{K} + (r - \frac{\sigma^2}{2})T}{\sigma \sqrt{T}}},
edp/.initial		= { \Theta + r S \Delta + \frac{1}{2} \sigma^2 S^2 \Gamma = r V},
call/.initial		= { C(S, T) =  S \mathcal{N}\left(   d_1 \right) - K e^{-rT} \mathcal{N}\left(   d_2\right)},
put/.initial		= { P(S, T) = -S \mathcal{N}\left( - d_1 \right) + K e^{-rT} \mathcal{N}\left( - d_2\right)},
}

\newcommand\formula[1]{\pgfkeys{formula,#1}}

% ReuseFormula (\RF)
\newcommand\RF[1][]{ \formula{#1} }

\begin{document}

It's easy to use in text $\RF[call]$.

This is Delta, noted $\Delta$ that is worth $\RF[delta]$.

Delta  is a rate of variation generally used to know the senisitivity of your option to changes in your underlying.

$\RF[forward div repo]$

$\RF[edp]$

Or format table with such long formulae

\begin{table}[tph]
\centering
\begin{tabular}{c}
\hline
$\RF[call]$ \\
$\RF[put]$  \\
$\RF[d1]$   \\
$\RF[d2]$   \\
\hline
\end{tabular}
\caption{Much simplier tables}
\end{table}

\end{document}

user 3.14159
I'm not sure if any of my suggestions is useful. Yes, you can store elements of equations in pgf keys, and this can make a lot of sense because of name space limitations. You can also "learn" and repeat combinations, but this affords global styles. Unfortunately, I was unable to get satisfactory results in align environments generated by the /.list key handler, but if you are willing to use a "refined" list handler this works, too.

\documentclass{article}
\usepackage{pgffor}
\usepackage{mathtools}
\makeatletter% stolen from forest
\pgfkeys{/handlers/.global style/.code=\pgfkeys{\pgfkeyscurrentpath/.global code=\pgfkeysalso{#1}}}
\pgfkeysdef{/handlers/.global code}{\pgfkeysglobaldef{\pgfkeyscurrentpath}{#1}}
\long\def\pgfkeysglobaldef#1#2{%
\long\def\pgfkeys@temp##1\pgfeov{#2}%
\pgfkeysgloballet{#1/.@cmd}{\pgfkeys@temp}%
\pgfkeysglobalsetvalue{#1/.@body}{#2}%
}
\def\pgfkeysgloballet#1#2{%
\expandafter\global\expandafter\let\csname pgfk@#1\endcsname#2%
}
\long\def\pgfkeysglobalsetvalue#1#2{%
\pgfkeys@temptoks{#2}\expandafter\xdef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}%
}
\makeatother
\newcommand{\diff}{\mathop{}\!\text{d}}
\DeclareMathOperator{\Euler}{e}
% I used long formulae on purpose
\pgfkeys{
formula/.is family,
formula/.unknown/.code={#1},
formula/.cd,
plain/.code={#1},
edp/.code		= { \Theta + r S \Delta + \frac{1}{2} \sigma^2 S^2 \Gamma = r V},
spot/.code		= { S },
today/.code		= { t_0 },
maturity/.code	= { T },
TTM/.code			= { T-t },
delta/.initial	= { \mathcal{N}\left(\frac{\ln \frac{F}{K} +\frac{1}{2}\sigma^2T}{\sigma \sqrt{T}}\right)  },
d_1/.code		= { \frac{\ln\frac{S}{K} + (r + \frac{\sigma^2}{2})T}{\sigma \sqrt{T}}},
d_2/.code		= { \frac{\ln\frac{S}{K} + (r - \frac{\sigma^2}{2})T}{\sigma \sqrt{T}}},
do align/.code={\pgfkeys{formula/list/unless first=\\}%
#1&=\formula{#1}},
}
\makeatletter
\newif\if@pgf@rlist@first
\pgfkeys{
formula/.cd,
list/only first/.code={\if@pgf@rlist@first#1\fi},
list/unless first/.code={\if@pgf@rlist@first\global\@pgf@rlist@firstfalse\else#1\fi},
}
\pgfkeys{/handlers/.rlist/.code=%
{%
\ifx\foreach\@undefined%
\pgfkeys@error{You need to load the pgffor package to use the .list key syntax.}%
\fi%
\global\@pgf@rlist@firsttrue
% Use foreach to unfold the list
\def\pgf@keys@temp{}%
\foreach \pgf@keys@key in{#1}%
{\expandafter\expandafter\expandafter\gdef%
\expandafter\expandafter\expandafter\pgf@keys@temp%
\expandafter\expandafter\expandafter{\expandafter\pgf@keys@temp\expandafter{\pgf@keys@key}}}%
\edef\pgf@keys@list@path{\pgfkeyscurrentpath}%
\expandafter\expandafter\expandafter\pgf@keys@do@list%
\expandafter\expandafter\expandafter{\expandafter\pgf@keys@list@path\expandafter}\pgf@keys@temp\pgf@stop%
}%
}
\makeatother

\newcommand\formula[2][]{%
\ifx#1\relax\relax
\else
\pgfkeys{formula/.cd,@#1/.global style={#2}}%
\fi
\pgfkeys{formula/.cd,#2}}

\newcommand\RF[2][]{\formula{@#2}}

\begin{document}
You can use formulas from your repository:
$\formula{edp}$.\bigskip

The optional argument can be used to store the keys in a global (!) style:
$\formula[f1]{spot,plain={=},today}$. As you can see, plain can be used to add
some arbitrary elements.\bigskip

You can repeat the style, $\RF{f1}$.\bigskip

Align can be used, too,
\begin{align}
\pgfkeys{formula/do align/.rlist={d_1,d_2}}
\end{align}
but at the expense of defining a refined'' list handler \texttt{/.rlist}. This
list handler allows us to distinguish the first item from the rest. Notice that
the \texttt{/.list} key handler is based on \verb|\foreach|, for which some
folklore says that it always puts things in groups and cannot deal with ampersands
($\&$) and the like. As one can see, the \texttt{/.list} key handler does not
have any of those limitations, nor does \verb|\foreach|, one only has to
train'' it a little bit, which is precisely what the \texttt{/.list} key
handler does. The above-mentioned ficiticous limitations are those which are
often said to prevent us from using \verb|\foreach| to create tabulars,
matrices, and/or aligned equations.
\end{document}

![Screen Shot 2021-05-19 at 2.55.34 PM.png](/image?hash=7848a262d22a64beb19a1ecb0830363aa9781f9d8c319783e86267b013778aab)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.


text:
# The Official JOKES SECTION :)

## Recommended Posts

well in my line of work* I try not to assume anything, and the unexpected is a regular and frequent occurance, I`ll chalk this one up to a pleasant surprise

* Surprise testing officer

##### Share on other sites

Here is a good one, especially if you hate microsludge*

Bill Gates dies and goes to St. Peter. St. Peter tells him "You have an equal amount of things that you have done good and things that you have done bad. So, I'll give you a choice of going to hell or heaven"

St. Peter first takes him to hell, and Gates sees beautiful women and brilliant gardens and all. Then, he is taken to heaven where he sees paradise. But, it was not as convincing as hell. Gates chooses hell. St. Peter says" Ok. I'll come after a week to check that everything is alright"

A week later, St. Peter comes to see that Gates is being tortured by old ladies. Horrible, Horrible stuff. Gates says "Hey, what I saw wasn't like this. It was MUCH better than this? What happened?"

St. Peter replies "That was a demo"

*Name made up by Capn' Refshmatt if I remember correctly in the Spyware thread for Microsoft!

##### Share on other sites

Yes, you remember correctly.

Thank you!

##### Share on other sites

A patient walks into the GP's office and sits down, "whats the matter?" the doctor asks

"i think im a moth" replies the patient. "well you dont need a GP you need a psychatrist", "i know" replies the patient. "well why did you come in here?" the doctor asks.

"because the light was on" replied the patient

##### Share on other sites

Q:What did the cannibal do after he dumped his girlfriend?

A:Wipped his a!

##### Share on other sites

Two cannibals are having lunch. One says, "Boy, your wife sure makes good soup!"

The other one says, "Yeah, but I'm going to miss her."

##### Share on other sites

lol! here is another:

A woman thinks that her husband is cheating on her, so, when the husband kisses her goodbye and leaves the house, she takes a shotgun, aims and fires, but she misses

When he comes bag, she hugs him and says "Oh, i missed you!"

##### Share on other sites

You probably won't get this unless you're from the UK, but nevermind:

2 Scousers are riding along the M62 from Manchester to Liverpool on a motorbike. They break down and start hitching a lift. A friendly trucker stops to see if he can help and the scousers ask him for a lift. He tells them he has no room in the wagon as he is carrying 20,000 bowling balls but will take a look at the bike for them. He tries everything he knows but is unable to repair it. Time is getting on now and he's late for his delivery so he tells the scousers he has to leave. "R hey lad" they say "gissa lift". The trucker once again explains that he has no room as he is carrying 20,000 bowling balls. The scousers put it to the driver that if they can manage to fit in the back will he take them and he agrees.

They manage to squeeze themselves and their motorbike into the back of the wagon so the driver shuts the doors and gets off on his way. By this time he is really late and so puts his foot down. Sure enough PC Plod of Greater Manchester Police pulls him up for speeding. The good officer asks the driver what he is carrying to which he replies Scouse Eggs. The policeman obviously doesn't believe this so wants to take a look. He opens the back door and quickly shuts it and locks it. He gets onto his radio and calls for immediate backup from as many officers as possible.

The dispatcher asks what emergency he has that requires so many officers. "I've got a wagon with 20,000 Scouse eggs in it - 2 have already hatched and the b*****ds have managed to nick a motorbike already".

##### Share on other sites

two cannibals are walking along the beach and find robinson crueso (bad spelling) washed up. being cannibals they decide to start munching, "you start at the head and ill start at the feet" one says to the other. alittle while later one looks up and says to his mate "hows it going up there?" , "yea good mate, im having a ball!" he replied

"Well slow down youre eating to fast!!" the first exclaimed

##### Share on other sites
You probably won't get this unless you're from the UK' date=' but nevermind:

2 Scousers are riding along the M62 from Manchester to Liverpool on a motorbike. They break down and start hitching a lift. A friendly trucker stops to see if he can help and the scousers ask him for a lift. He tells them he has no room in the wagon as he is carrying 20,000 bowling balls but will take a look at the bike for them. He tries everything he knows but is unable to repair it. Time is getting on now and he's late for his delivery so he tells the scousers he has to leave. "R hey lad" they say "gissa lift". The trucker once again explains that he has no room as he is carrying 20,000 bowling balls. The scousers put it to the driver that if they can manage to fit in the back will he take them and he agrees.

They manage to squeeze themselves and their motorbike into the back of the wagon so the driver shuts the doors and gets off on his way. By this time he is really late and so puts his foot down. Sure enough PC Plod of Greater Manchester Police pulls him up for speeding. The good officer asks the driver what he is carrying to which he replies Scouse Eggs. The policeman obviously doesn't believe this so wants to take a look. He opens the back door and quickly shuts it and locks it. He gets onto his radio and calls for immediate backup from as many officers as possible.

The dispatcher asks what emergency he has that requires so many officers. "I've got a wagon with 20,000 Scouse eggs in it - 2 have already hatched and the b*****ds have managed to nick a motorbike already".[/quote']

i'm not sure if it's a compliment or otherwise, please feel free to correct me, but is this what's referred as the Dry, British Humor?

also, is that considered a complement or an insult?

##### Share on other sites
i'm not sure if it's a compliment or otherwise' date=' please feel free to correct me, but is this what's referred as the [b']Dry, British Humor[/b]?

also, is that considered a complement or an insult?

That is indeed British Humour, and I don't take it as an insult

##### Share on other sites
-Can you get cornered in a round room?

-Why is chopsticks the easiest thing to play on the piano' date=' but the most difficult things to eat with?

-Why do you get in trouble for blocking an exit? In the case of an emergency, wouldn't you run out, therefore NOT be blocking the exit.

-Why, on a phone, is 0 after and not before 1?

-If the planet 'mars' had earthquakes, would they be called 'marsquakes'?

-If a missing person sees their picture on a poster that offers a reward, would they get the money?

-If you were a genie, what would you do if a person gave you this wish 'I wish you would not grant me this wish'?

-Why on Earth does flammable and inflammable mean the same thing?

-Why isn't there mouse flavoured cat-food?

-What would a fly without wings be called? A walk?

-Why do mattresses have designs on them? Aren't they going to be covered with sheets?

-If scientists were going to figure out something about time travel, wouldn't we be seeing scientists from the future?

-How come car keys, are the only keys that have teeth on both sides?

-Who gets to keep the coins thrown in a wishing well?

-Can a person cry under water?

-You know Roadrunner, the cartoon? If Acme's stuff doesn't work, why does the coyote still buy from them?

-Why does a round pizza come in a square cardboard box?

-If CD's in a CD player were spun backwards, would it say everything backwards?

-If lava melts rock ,then why doesn't it melt the volcano itself?

-If a criminal turns him or herself in, shouldn't he or she get the reward money?

-Why do birds bob their heads while they walk?

-What would happen if all the people in the world were to flush their toilets all at the same time?

-Why isn't the letters Q and Z included on the normal telephone?

-According to the saying "easier said than done', is there anything easier done than said?

-Do fish ever get thirsty?

-In a hamburger bun, why is the bottom bun always smaller than the top one?

[/quote']

Why does everyone make fun of me when I answer the questions?

##### Share on other sites

I won't! I would actually be glad if you could post the answers on http://www.dragonslairforums.co.nr in the general section!

##### Share on other sites

Well, most of them can be attributed to the messed up English language. For the others:

-Why do you get in trouble for blocking an exit? In the case of an emergency, wouldn't you run out, therefore NOT be blocking the exit.

True, if it is an emergency exit. If it is just an exit, then people may need to get by.

-Why, on a phone, is 0 after and not before 1?

Back in the days of pulse tone, one pulse = 1, two pulses = 2, and so on. But you can't have zero pulses, so when you dial "0," it would send ten pulses. Think of a rotary telephone, the dial mechanically pulses the line, the more you turn the dial, the more pulses, so zero was put last.

-If a missing person sees their picture on a poster that offers a reward, would they get the money?

If the missing person has information that leads to the capture of a kidnapper or something, then I would say so. I'm not sure who puts up reward money for missing persons, but presumably their families, in which case it wouldn't matter.

-Why on Earth does flammable and inflammable mean the same thing?

The prefix "in-" does not indicate negation, it comes from the word "inflame."

-Why isn't there mouse flavoured cat-food?

Does the mouse really care? Most people aren't very fond of mice, so it's not very good advertising.

-Why do mattresses have designs on them? Aren't they going to be covered with sheets?

You've got to keep the padding together anyway, so the stitching is necessary. As for the patterns and printed designs, it's just advertising. People are more likely to buy it if it looks nice.

-If scientists were going to figure out something about time travel, wouldn't we be seeing scientists from the future?

http://www.mkaku.org/articles/phys_time_travel.shtml - Michio Kaku

It's very funny, worth a read.

-How come car keys, are the only keys that have teeth on both sides?

Other locks have teeth on both-sides, and are actually more secure (harder to pick). Many [older] cars have only one set of teeth.

-Who gets to keep the coins thrown in a wishing well?

Many times they go to charities, but it depends who owns it.

-Can a person cry under water?

I've heard that you can, but have never tried it.

-You know Roadrunner, the cartoon? If Acme's stuff doesn't work, why does the coyote still buy from them?

I think the Acme stuff works, only the coyote isn't very good at using it. He doesn't make very good connections when hooking up the Trinitrotolulene. After he sticks his face down next to it and jiggles the wires, it detonates properly.

-Why does a round pizza come in a square cardboard box?

Circular cardboard boxes are hard to make.

-If CD's in a CD player were spun backwards, would it say everything backwards?

I don't think so, because the CD has other instructions on it in order to tell the cd player how to "act." These instructions wouldn't be understood backwards. This does work for vinyl, however.

-If lava melts rock ,then why doesn't it melt the volcano itself?

It does, to an extent. But you have to consider that the liquid lava is already close to its melting temperatures, so it doesn't have much energy to give to the surrounding rock (solid lava). If you take solid water (ice) and pour liquid "ice-water" on it, not much of the ice will melt. The same is true with solid and liquid lava.

-If a criminal turns him or herself in, shouldn't he or she get the reward money?

I don't think so. You lose some of your rights when you commit a felony.

-Why do birds bob their heads while they walk?

Birds with eyes on the sides of their heads have a wide range of vision. However, their field of vision from each of their eyes overlaps with the other by very little. Therefore, they bob their heads to gain depth perception, by viewing the same thing from two different angles.

-What would happen if all the people in the world were to flush their toilets all at the same time?

I'm betting it wouldn't be a good idea.

-Why isn't the letters Q and Z included on the normal telephone?

They aren't used very much in the english language, so they were omitted whenever they set up the phone system. However, they are being "squeezed in" on most cellular phones nowadays.

-According to the saying "easier said than done', is there anything easier done than said?

Most of your body processes. Chewing food, swallowing it, digesting it, absorbing it. But the biggest of all: Thinking. Because we can't explain it, but we do it all the time.

-Do fish ever get thirsty?

Fish "drink" water all the time and extract oxygen for their cells. So I guess you could say they get "thirsty" when taken out of water or in water with low oxygen content.

##### Share on other sites

Okay, we need more funny:

There were these two guys out hiking when they came upon an old, abandoned mine shaft. Curious about its depth they threw in a pebble and waited for the sound of it striking the bottom, but they heard nothing. They went and got a bigger rock, threw it in and waited. Still nothing. They searched the area for something larger and came upon a railroad tie. With great difficulty, the two men carried it to the opening and threw it in. While waiting for it to hit bottom, a goat suddenly darted between them and leapt into the hole!

The guys were still standing there with astonished looks upon their faces when a man walked up to them. He asked them if they had seen a goat anywhere in the area and they said that one had just jumped into the mine shaft in front of them! The man replied, "Oh no. That couldn't be my goat, mine was tied to a railroad tie."

##### Share on other sites

Two guys, standing at night on a bridge after having had a few pints, both decide to relieve themselves over the side. The first, in an attempt to impress, says, "Water sure is cold." The second replies, "Yeah. Deep, too."

##### Share on other sites

Bush is sleepless one night when the ghost of George Washington appears before him. Bush says, "George, what's the best thing I can do to help the country?"

Washington tells him, "Be honest and set a good example like I did." Then he vanishes.

Bush thinks, yeah right, like that's ever going to happen. Suddenly the ghost of Thomas Jefferson appears before him. Bush asks him, "Tom, what's the best thing I can do to help the country?"

Jefferson tells him, "Put the general welfare of the people ahead of the greed of big business." Then he vanishes.

Bush snickers to himself but suddenly the ghost of Abraham Lincoln appears before him. Bush asks, "Abe, what's the best thing I can do to help the country?"

Lincoln replies, "Go to the theater."

##### Share on other sites

An elderly man and his wife are rocking on their front porch. The man says to her, "Mabel, I have to confess something to you. I cheated on you three times in the forrty-nine years we've been married."

Mabel looks over at him and says, "I know", then stands up, goes inside and comes out with a shoebox. She tells him, "After your first affair, I started having affairs myself." She opens the box and inside are a couple of dozen kernels of corn and over fifteen thousand dollars in cash. He asks, "What's this?"

Mabel says, "Every time I had an affair, I put a kernel of corn in this box."

His eyes widen as he counts them, then he asks, "Where did you get the cash?"

Mabel says, "Every time I got up to a bushel, I'd sell it!"

##### Share on other sites

A guy had a headache for twenty years and was at the point where he wanted to kill himself, but he decided to go to a specialist first.

The doctor said "You have a very rare problem, your testicles are pressed up against your spine causing your headache. The only way to fix it is to remove your testicles."

The man hesitantly agrees and gets them removed.

On his way home he walks past a tailor shop with a sign saying "ALL SUITS HALF PRICE"

He walks in and the tailor greets him and says, "Hello sir, I see you want a suit. I would say that you are a 34 sleeve and a 24 pant."

"Wow! How did you know that?" asked the man.

"Sir, I've been in this business for 40 years. Would you like shoes to go with that?"

"Sure" says the man.

The tailor says, "I'd say that you're a size 10 wide."

"Wow, what a great talent!" says the man.

"Thanks" replied the shopkeeper, "Now how about some undergarments?"

"Ok, see if you can guess my size", said the man.

"Easy, 36" said the shopkeeper.

"Nope, 30" replied the man.

The tailor says, "Impossible, a size 30 would squish your testicles against your spine and you'd get a headache".

##### Share on other sites

A woman in a hot air balloon realized she was lost. She reduced altitude and spotted a man below. She descended a bit more and shouted "Excuse me,can you help? I promised a friend I would meet him an hour ago, but I don't know where I am.

"The man below replied "You are in a hot air balloon, hovering approximately 30 feet above the ground. You are between 40 and 41 degrees north latitude and between 59 and 60 degrees west longitude."

"You must be an engineer" said the balloonist.

"I am" he replied. "How did you know?".

"Well," answered the balloonist, "Everything you told me is technically correct, but I have no idea what to make of your information, and the fact is, I am still lost. Frankly, you've not been much help so far."

The man responded, "You must be in management."

"I am" she replied, "But how did you know?"

"Well," said the man, "You don't know where you are, or where you are going. You have risen to where you are due to a large quantity of hot air. You made a promise, which you have no idea how to keep, and you expect people beneath you to solve your problems. The fact is, you are in exactly the same position you were in before we met, but now, somehow, it's my fault."

##### Share on other sites

A man goes to a doctor for his annual check-up. After performing some tests, the doctor comes into the examining room with a serious look on his face. The man immediately senses something is wrong.

MAN: What the matter, Doc?

DOCTOR: Well... I'm afraid you don't have long to live.

MAN: I don't believe this. How long do I have?

DOCTOR: Uh... 10.

MAN: Ten what? Years? Months?

DOCTOR: 9...8...7....

##### Share on other sites

"How did you break your leg?" the doctor asked the middle-aged farmhand as he wrapped the cast.

"Well, doc, 25 years ago ..."

"Never mind the past. Tell me how you broke your leg this morning."

"Like I was saying...25 years ago, when I first started working on the

farm, that night, right after I'd gone to bed, the farmer's beautiful

daughter came into my room. She asked me if there was anything I wanted.

I said no, everything is fine. "Are you sure?", she asked. "I'm sure,

I said. "Isn't there anything I can do for you?" she wanted to know.

"I reckon not" I replied ...

"Excuse me," said the doctor, "What does this story have to do with your leg?"

"Well, this morning," the farmhand explained, "when it dawned on me what

she meant, I fell off the roof!"

##### Share on other sites

A young bloke has started work on at a large ranch, and the boss sends him up

the back paddocks to do some fencing work, come evening hasn't returned.

The boss gets on the CB radio to check if he's all right.

"I've got a problem, Boss. I'm stuck 'ere. I hit a pig!"

"Ah well, these things happen sometimes," the boss says. "Just drag the

carcass off the road so nobody else hits it in the dark."

"But he's not dead, boss. He's gotten tangled up on the bull bar, and I've

tried to untangle him, but he's kicking and squealing, and he's real big boss.

I'm afraid he's gonna hurt me!"

"Never mind," says the boss. "There's a .38 under the tarp in the back. Get

that out and shoot him. Then drag the carcass

off the road and come on home."

"Okay, boss."

Another half an hour goes by, but there's still not a peep from the young

fella. The boss gets back on the CB. "What's the problem, son?"

"Well, I did what you said boss, but I'm still stuck."

"What's up? Did you drag the pig off the road like I said?"

"Yeah boss, but his motorcycle is still jammed under the truck."

##### Share on other sites

A fresh-faced lad on the eve of his wedding night goes to his mother

with a question that had been puzzling him for most of the day

"Mom" he asks "why are wedding dresses white?"

The mother looks at her son and replies,

"Son, the color is symbolic of the bride's purity of

spirit and devotion."

The son thanks his mom and goes off to double-check this with his father.

"Dad why are wedding dresses white?"

The father looks at his son in surprise and says,

"Son, all household appliances come in white."

## Create an account

Register a new account


text:
# aliquote

## < a quantity that can be divided into another a whole number of time />

TIL that we can use references and labels in Org babel!

You can also add a ‘-r’ switch which removes the labels from the source code. With the ‘-n’ switch, links to these references are labeled by the line numbers from the code listing. Otherwise links use the labels with no parentheses. Here is an example:

    #+BEGIN_SRC emacs-lisp -n -r
(save-excursion                 (ref:sc)
(goto-char (point-min))      (ref:jump)
#+END_SRC
In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]]
jumps to point-min.


text:
# how to pass jasper file path to subreport of subreport

I am using iReport tool in conjunction with JasperReports 1.3.4.

I have a master report, which contain two subreports. One of these subreports has an embedded subreport. All of the .jasper files reside in the same directory.

iReport generated the parameter called SUBREPORT_DIR. The subreportExpression expresses the subreport filename as ![CDATA[$P{SUBREPORT_DIR} + "subreport.jasper"]. Everything works great when the report is generated from within iReport. But, I have a small Java web appplication that I am trying to use to generate reports. I pass a "SUBREPORT_DIR" parameter to JasperFillManager.fillReport(String sourceFileName, Map parameters, JRBeanCollectionDatasource). This SUBREPORT_DIR is set to the directory in which the master report is located. fillReport throws an exception:  net.sf.jasperreports.engine.JRException: Could not load object from location : .sub-subreport.jasper.  It appears that the first subreport is trying to process its subreport(embedded subreport), but the SUBREPORT_DIR is not being resolved, or used properly to generate the name of the sub-subreport. Is there something I'm missing? How should this scenario be handled? - From the exception message it seems that you are using a "." as the SUBREPORT_DIR parameter. If so, try using "./" or just "." – Giorgos Dimtsas Sep 13 '10 at 19:58 where to put "./" ? i am confusing – Manu Sep 14 '10 at 6:55 Right now I suppose that you are using: parameters.put("SUBREPORT_DIR", "."); JasperFillManager.fillReport(String sourceFileName, Map parameters, JRBeanCollectionDatasource); Try using: parameters.put("SUBREPORT_DIR", ""); – Giorgos Dimtsas Sep 14 '10 at 8:00 In java class Param, i am setting param like ..param.put("SUBREPORT_DIR",filepath) where filepath =request.getSession(true).getServletContext().getRealPath("/jsps/jrxmls/") . as per your advice how can i change it to "".then it will pass null value right? – Manu Sep 14 '10 at 9:35 It will pass an empty String value. That will make the master reports look for their subreports in their current path. Also, are your .jasper files in the same folder of your .jrxml files? – Giorgos Dimtsas Sep 14 '10 at 9:51 ## 4 Answers Click in 'Subreport1', go to the properties tab -> Subreport properties -> Parameters You will pass your 'MasterReport' SUBREPORT_DIR parameter as a parameter to 'Subreport1'. Create this entry: Name: SUBREPORT_DIR Expression:$P{SUBREPORT_DIR}

Don't forget to recompile your reports and make sure to republish your web app in the application server.

-
it worked. thank you very much –  OmaL Jan 29 '14 at 8:49

I had the same issue and setting the SUBREPORT_DIR to the full package name containing my reports worked.

For example:

"com/mycomp/myapp/reports/"

Our set ups are similar in that you have all reports in the same directory. The difference is I am running my app from the desktop (Java SE). However, my reports were located in a jar file. When I tried to set teh SUBREPORT_DIR to c:\path\to\app\myapp.jar!\com\mycomp\myapp\reports Jasper failed to locate the file.

Hope this helps.

-

As Marcio already explained, your SUBREPORT_DIR parameter has to be passed from the calling report to the subreport. Using relative path with .or ./ is not reliable, an absolute path is always to prefer.

So you have to write in your jrxml file:

<subreport isUsingCache="false">
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "mySubreport.jasper"]]></subreportExpression>
</subreport>

You have to pass the subreportParameterExpression with the $P{SUBREPORT_DIR}, elswise it won't pass the parameters (only setting <subreportParameter name="SUBREPORT_DIR"/> is not enough). - just set $P{SUBREPORT_DIR} as prompt and pass your value(the path to the directory may not be valid like c:\something.jasper instead of c:\\something.jasper)

-


text:
D. Non-Secret Cypher
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Berland starts to seize the initiative on the war with Flatland. To drive the enemy from their native land, the berlanders need to know exactly how many more flatland soldiers are left in the enemy's reserve. Fortunately, the scouts captured an enemy in the morning, who had a secret encrypted message with the information the berlanders needed so much.

The captured enemy had an array of positive integers. Berland intelligence have long been aware of the flatland code: to convey the message, which contained a number m, the enemies use an array of integers a. The number of its subarrays, in which there are at least k equal numbers, equals m. The number k has long been known in the Berland army so General Touristov has once again asked Corporal Vasya to perform a simple task: to decipher the flatlanders' message.

Help Vasya, given an array of integers a and number k, find the number of subarrays of the array of numbers a, which has at least k equal numbers.

Subarray a[i... j] (1 ≤ i ≤ j ≤ n) of array a = (a1, a2, ..., an) is an array, made from its consecutive elements, starting from the i-th one and ending with the j-th one: a[i... j] = (ai, ai + 1, ..., aj).

Input

The first line contains two space-separated integers n, k (1 ≤ k ≤ n ≤ 4·105), showing how many numbers an array has and how many equal numbers the subarrays are required to have, correspondingly.

The second line contains n space-separated integers ai (1 ≤ ai ≤ 109) — elements of the array.

Output

Print the single number — the number of such subarrays of array a, that they have at least k equal integers.

Please do not use the %lld specifier to read or write 64-bit integers in С++. In is preferred to use the cin, cout streams or the %I64d specifier.

Examples
Input
4 21 2 1 2
Output
3
Input
5 31 2 1 1 3
Output
2
Input
3 11 1 1
Output
6
Note

In the first sample are three subarrays, containing at least two equal numbers: (1,2,1), (2,1,2) and (1,2,1,2).

In the second sample are two subarrays, containing three equal numbers: (1,2,1,1,3) and (1,2,1,1).

In the third sample any subarray contains at least one 1 number. Overall they are 6: (1), (1), (1), (1,1), (1,1) and (1,1,1).


text:
# Is this a valid proof of eigenvectors/values of nonzeroilty?

Let $A$ be a square real matrix such that it is symmetric, show that if $Ax = \lambda x$ for some nonzero vector in $\mathbb{C}^n$, then in fact, $\operatorname{Re}(x)$ is an eigenvector of $A$ if it is nonzero given that $\lambda$ is real.

I thought that to prove that the real part of $x$ is real, I would do a contrapositive and a contradiction that is, "If $\mathbf{x}$ is non-zero, then \operatorname{Re}(x) is nonzero" will turn to "If $\operatorname{Re}(x)$ is zero, then $x$ is zero".

Proof

Fact: Eigenvectors are by definition not zero vectors

Assume that $\operatorname{Re}(x)$ is zero, then $\mathbf{x}$ is zero.

So we have $\mathbf{x} = \operatorname{Re}(x) + \operatorname{Im}(x)i = 0 + \operatorname{Im}(x) = \operatorname{Im}(x)i$

and we arrive at $\mathbf{x} = \operatorname{Im}(x)i$, however $\mathbf{x} \neq 0$, so $\operatorname{IM}(x) \neq 0$, therefore this is a contradiction and $\operatorname{Re}(x)$ is nonzero.

Q.E.D

-
You haven't used the hypothesis that $A$ is symmetric, which makes me wonder why it's there. –  Gerry Myerson Jan 29 '12 at 23:11

Since $A$ is real $\overline{Ax}=A\bar x$ and by the properties of inner product $\lambda$ has to be a real number. So $A\bar x=\overline{Ax}=\overline{\lambda x}=\lambda\bar x$ and so $$A(\operatorname{Re}x)=A\left(\frac{x+\bar x}2\right)=\frac 12(Ax+A\bar x)=\frac 12(\lambda x+\lambda \bar x)=\lambda\operatorname{Re} x,$$ hence if $\operatorname{Re}\neq 0$ it's an eigenvector for $\lambda$.
But $\operatorname{Re}x$ can be $0$, for example taking $A=Id$, $\lambda=1$ and $x=i(1,0)$, then $Ax=x$ but of course $\operatorname{Re} x=0$.
Identity matrix (I could take the $0$ matrix but it's a degenerate example). –  Davide Giraudo Jan 29 '12 at 20:14
It's $i$ times the first vector of the canonical basis of $\mathbb C^2$. It's the statement $x\neq 0$ implies $\operatorname{Re}x\neq 0$ which is wrong. –  Davide Giraudo Jan 29 '12 at 20:23
Sorry i have no idea what a canonical basis is. I proved that $Re(x) \neq 0$ implies $x \neq 0$, not $x \neq 0$ implies $Re(x) \neq 0$ –  lem Jan 29 '12 at 20:25


text:
# Matrix Spaces¶

You can create any space $$\text{Mat}_{n\times m}(R)$$ of either dense or sparse matrices with given number of rows and columns over any commutative or noncommutative ring.

EXAMPLES:

sage: MS = MatrixSpace(QQ,6,6,sparse=True); MS
Full MatrixSpace of 6 by 6 sparse matrices over Rational Field
sage: MS.base_ring()
Rational Field
sage: MS = MatrixSpace(ZZ,3,5,sparse=False); MS
Full MatrixSpace of 3 by 5 dense matrices over Integer Ring

class sage.matrix.matrix_space.MatrixSpace(base_ring, nrows, ncols, sparse, implementation)

The space of matrices of given size and base ring

EXAMPLES:

Some examples of square 2 by 2 rational matrices:

sage: MS = MatrixSpace(QQ, 2)
sage: MS.dimension()
4
sage: MS.dims()
(2, 2)
sage: B = MS.basis()
sage: list(B)
[
[1 0]  [0 1]  [0 0]  [0 0]
[0 0], [0 0], [1 0], [0 1]
]
sage: B[0,0]
[1 0]
[0 0]
sage: B[0,1]
[0 1]
[0 0]
sage: B[1,0]
[0 0]
[1 0]
sage: B[1,1]
[0 0]
[0 1]
sage: A = MS.matrix([1,2,3,4])
sage: A
[1 2]
[3 4]

The above matrix A can be multiplied by a 2 by 3 integer matrix:

sage: MS2 = MatrixSpace(ZZ, 2, 3)
sage: B = MS2.matrix([1,2,3,4,5,6])
sage: A * B
[ 9 12 15]
[19 26 33]

Check categories:

sage: MatrixSpace(ZZ,10,5)
Full MatrixSpace of 10 by 5 dense matrices over Integer Ring
sage: MatrixSpace(ZZ,10,5).category()
Category of infinite enumerated finite dimensional modules with basis over
(euclidean domains and infinite enumerated sets and metric spaces)
sage: MatrixSpace(ZZ,10,10).category()
Category of infinite enumerated finite dimensional algebras with basis over
(euclidean domains and infinite enumerated sets and metric spaces)
sage: MatrixSpace(QQ,10).category()
Category of infinite finite dimensional algebras with basis over
(number fields and quotient fields and metric spaces)

base_extend(R)

Return base extension of this matrix space to R.

INPUT:

• R - ring

OUTPUT: a matrix space

EXAMPLES:

sage: Mat(ZZ,3,5).base_extend(QQ)
Full MatrixSpace of 3 by 5 dense matrices over Rational Field
sage: Mat(QQ,3,5).base_extend(GF(7))
Traceback (most recent call last):
...
TypeError: no base extension defined

basis()

Return a basis for this matrix space.

Warning

This will of course compute every generator of this matrix space. So for large dimensions, this could take a long time, waste a massive amount of memory (for dense matrices), and is likely not very useful. Don’t use this on large matrix spaces.

EXAMPLES:

sage: list(Mat(ZZ,2,2).basis())
[
[1 0]  [0 1]  [0 0]  [0 0]
[0 0], [0 0], [1 0], [0 1]
]

cached_method(f, name=None, key=None, do_pickle=None)

A decorator for cached methods.

EXAMPLES:

In the following examples, one can see how a cached method works in application. Below, we demonstrate what is done behind the scenes:

sage: class C:
....:     @cached_method
....:     def __hash__(self):
....:         print("compute hash")
....:         return int(5)
....:     @cached_method
....:     def f(self, x):
....:         print("computing cached method")
....:         return x*2
sage: c = C()
sage: type(C.__hash__)
<type 'sage.misc.cachefunc.CachedMethodCallerNoArgs'>
sage: hash(c)
compute hash
5

When calling a cached method for the second time with the same arguments, the value is gotten from the cache, so that a new computation is not needed:

sage: hash(c)
5
sage: c.f(4)
computing cached method
8
sage: c.f(4) is c.f(4)
True

Different instances have distinct caches:

sage: d = C()
sage: d.f(4) is c.f(4)
computing cached method
False
sage: d.f.clear_cache()
sage: c.f(4)
8
sage: d.f(4)
computing cached method
8

Using cached methods for the hash and other special methods was implemented in trac ticket #12601, by means of CachedSpecialMethod. We show that it is used behind the scenes:

sage: cached_method(c.__hash__)
<sage.misc.cachefunc.CachedSpecialMethod object at ...>
sage: cached_method(c.f)
<sage.misc.cachefunc.CachedMethod object at ...>

The parameter do_pickle can be used if the contents of the cache should be stored in a pickle of the cached method. This can be dangerous with special methods such as __hash__:

sage: class C:
....:     @cached_method(do_pickle=True)
....:     def __hash__(self):
....:         return id(self)

sage: import __main__
sage: __main__.C = C
sage: c = C()
sage: hash(c) # random output
sage: hash(d) == hash(c)
True

However, the contents of a method’s cache are not pickled unless do_pickle is set:

sage: class C:
....:     @cached_method
....:     def __hash__(self):
....:         return id(self)

sage: __main__.C = C
sage: c = C()
sage: hash(c) # random output
sage: hash(d) == hash(c)
False

cardinality()

Return the number of elements in self.

EXAMPLES:

sage: MatrixSpace(GF(3), 2, 3).cardinality()
729
sage: MatrixSpace(ZZ, 2).cardinality()
+Infinity
sage: MatrixSpace(ZZ, 0, 3).cardinality()
1

change_ring(R)

Return matrix space over R with otherwise same parameters as self.

INPUT:

• R - ring

OUTPUT: a matrix space

EXAMPLES:

sage: Mat(QQ,3,5).change_ring(GF(7))
Full MatrixSpace of 3 by 5 dense matrices over Finite Field of size 7

characteristic()

Return the characteristic.

EXAMPLES:

sage: MatrixSpace(ZZ, 2).characteristic()
0
sage: MatrixSpace(GF(9), 0).characteristic()
3

column_space()

Return the module spanned by all columns of matrices in this matrix space. This is a free module of rank the number of columns. It will be sparse or dense as this matrix space is sparse or dense.

EXAMPLES:

sage: M = Mat(GF(9,'a'),20,5,sparse=True); M.column_space()
Sparse vector space of dimension 20 over Finite Field in a of size 3^2

construction()

EXAMPLES:

sage: A = matrix(ZZ, 2, [1..4], sparse=True)
sage: A.parent().construction()
(MatrixFunctor, Integer Ring)
sage: A.parent().construction()[0](QQ['x'])
Full MatrixSpace of 2 by 2 sparse matrices over Univariate Polynomial Ring in x over Rational Field
sage: parent(A/2)
Full MatrixSpace of 2 by 2 sparse matrices over Rational Field

dimension()

Return (m rows) * (n cols) of self as Integer.

EXAMPLES:

sage: MS = MatrixSpace(ZZ,4,6)
sage: u = MS.dimension()
sage: u - 24 == 0
True

dims()

Return (m row, n col) representation of self dimension.

EXAMPLES:

sage: MS = MatrixSpace(ZZ,4,6)
sage: MS.dims()
(4, 6)

gen(n)

Return the n-th generator of this matrix space.

This does not compute all basis matrices, so it is reasonably intelligent.

EXAMPLES:

sage: M = Mat(GF(7),10000,5); M.ngens()
50000
sage: a = M.10
sage: a[:4]
[0 0 0 0 0]
[0 0 0 0 0]
[1 0 0 0 0]
[0 0 0 0 0]

identity_matrix()

Return the identity matrix in self.

self must be a space of square matrices. The returned matrix is immutable. Please use copy if you want a modified copy.

EXAMPLES:

sage: MS1 = MatrixSpace(ZZ,4)
sage: MS2 = MatrixSpace(QQ,3,4)
sage: I = MS1.identity_matrix()
sage: I
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: Er = MS2.identity_matrix()
Traceback (most recent call last):
...
TypeError: identity matrix must be square

is_dense()

Return whether matrices in self are dense.

EXAMPLES:

sage: Mat(RDF,2,3).is_sparse()
False
sage: Mat(RR,123456,22,sparse=True).is_sparse()
True

is_finite()

Return whether this matrix space is finite.

EXAMPLES:

sage: MatrixSpace(GF(101), 10000).is_finite()
True
sage: MatrixSpace(QQ, 2).is_finite()
False

is_sparse()

Return whether matrices in self are sparse.

EXAMPLES:

sage: Mat(GF(2011),10000).is_sparse()
False
sage: Mat(GF(2011),10000,sparse=True).is_sparse()
True

matrix(x=None, **kwds)

Create a matrix in self.

INPUT:

• x – data to construct a new matrix from. See matrix()
• coerce – (default: True) if False, assume without checking that the values in x lie in the base ring

OUTPUT:

• a matrix in self.

EXAMPLES:

sage: M = MatrixSpace(ZZ, 2)
sage: M.matrix([[1,0],[0,-1]])
[ 1  0]
[ 0 -1]
sage: M.matrix([1,0,0,-1])
[ 1  0]
[ 0 -1]
sage: M.matrix([1,2,3,4])
[1 2]
[3 4]

Note that the last “flip” cannot be performed if x is a matrix, no matter what is rows (it used to be possible but was fixed by trac ticket #10793):

sage: projection = matrix(ZZ,[[1,0,0],[0,1,0]])
sage: projection
[1 0 0]
[0 1 0]
sage: projection.parent()
Full MatrixSpace of 2 by 3 dense matrices over Integer Ring
sage: M = MatrixSpace(ZZ, 3 , 2)
sage: M
Full MatrixSpace of 3 by 2 dense matrices over Integer Ring
sage: M(projection)
Traceback (most recent call last):
...
ValueError: inconsistent number of rows: should be 3 but got 2

If you really want to make from a matrix another matrix of different dimensions, use either transpose method or explicit conversion to a list:

sage: M(projection.list())
[1 0]
[0 0]
[1 0]

matrix_space(nrows=None, ncols=None, sparse=False)

Return the matrix space with given number of rows, columns and sparsity over the same base ring as self, and defaults the same as self.

EXAMPLES:

sage: M = Mat(GF(7),100,200)
sage: M.matrix_space(5000)
Full MatrixSpace of 5000 by 200 dense matrices over Finite Field of size 7
sage: M.matrix_space(ncols=5000)
Full MatrixSpace of 100 by 5000 dense matrices over Finite Field of size 7
sage: M.matrix_space(sparse=True)
Full MatrixSpace of 100 by 200 sparse matrices over Finite Field of size 7

ncols()

Return the number of columns of matrices in this space.

EXAMPLES:

sage: M = Mat(ZZ['x'],200000,500000,sparse=True)
sage: M.ncols()
500000

ngens()

Return the number of generators of this matrix space.

This is the number of entries in the matrices in this space.

EXAMPLES:

sage: M = Mat(GF(7),100,200); M.ngens()
20000

nrows()

Return the number of rows of matrices in this space.

EXAMPLES:

sage: M = Mat(ZZ,200000,500000)
sage: M.nrows()
200000

one()

Return the identity matrix in self.

self must be a space of square matrices. The returned matrix is immutable. Please use copy if you want a modified copy.

EXAMPLES:

sage: MS1 = MatrixSpace(ZZ,4)
sage: MS2 = MatrixSpace(QQ,3,4)
sage: I = MS1.identity_matrix()
sage: I
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: Er = MS2.identity_matrix()
Traceback (most recent call last):
...
TypeError: identity matrix must be square

random_element(density=None, *args, **kwds)

Return a random element from this matrix space.

INPUT:

• density - float or None (default: None); rough measure of the proportion of nonzero entries in the random matrix; if set to None, all entries of the matrix are randomized, allowing for any element of the underlying ring, but if set to a float, a proportion of entries is selected and randomized to non-zero elements of the ring
• *args, **kwds - remaining parameters, which may be passed to the random_element function of the base ring. (“may be”, since this function calls the randomize function on the zero matrix, which need not call the random_element function of the base ring at all in general.)

OUTPUT:

• Matrix

Note

This method will randomize a proportion of roughly density entries in a newly allocated zero matrix.

By default, if the user sets the value of density explicitly, this method will enforce that these entries are set to non-zero values. However, if the test for equality with zero in the base ring is too expensive, the user can override this behaviour by passing the argument nonzero=False to this method.

Otherwise, if the user does not set the value of density, the default value is taken to be 1, and the option nonzero=False is passed to the randomize method.

EXAMPLES:

sage: Mat(ZZ,2,5).random_element()
[ -8   2   0   0   1]
[ -1   2   1 -95  -1]
sage: Mat(QQ,2,5).random_element(density=0.5)
[  2   0   0   0   1]
[  0   0   0 1/2   0]
sage: Mat(QQ,3,sparse=True).random_element()
[  -1  1/3    1]
[   0   -1    0]
[  -1    1 -1/4]
sage: Mat(GF(9,'a'),3,sparse=True).random_element()
[      1       2       1]
[  a + 2     2*a       2]
[      2 2*a + 2       1]

row_space()

Return the module spanned by all rows of matrices in this matrix space. This is a free module of rank the number of rows. It will be sparse or dense as this matrix space is sparse or dense.

EXAMPLES:

sage: M = Mat(ZZ,20,5,sparse=False); M.row_space()
Ambient free module of rank 5 over the principal ideal domain Integer Ring

some_elements()

Return some elements of this matrix space.

See TestSuite for a typical use case.

OUTPUT:

An iterator.

EXAMPLES:

sage: M = MatrixSpace(ZZ, 2, 2)
sage: tuple(M.some_elements())
(
[ 0  1]  [1 0]  [0 1]  [0 0]  [0 0]
[-1  2], [0 0], [0 0], [1 0], [0 1]
)
sage: M = MatrixSpace(QQ, 2, 3)
sage: tuple(M.some_elements())
(
[ 1/2 -1/2    2]  [1 0 0]  [0 1 0]  [0 0 1]  [0 0 0]  [0 0 0]  [0 0 0]
[  -2    0    1], [0 0 0], [0 0 0], [0 0 0], [1 0 0], [0 1 0], [0 0 1]
)
sage: M = MatrixSpace(SR, 2, 2)
sage: tuple(M.some_elements())
(
[some_variable some_variable]  [1 0]  [0 1]  [0 0]  [0 0]
[some_variable some_variable], [0 0], [0 0], [1 0], [0 1]
)

transposed()

The transposed matrix space, having the same base ring and sparseness, but number of columns and rows is swapped.

EXAMPLES:

sage: MS = MatrixSpace(GF(3), 7, 10)
sage: MS.transposed
Full MatrixSpace of 10 by 7 dense matrices over Finite Field of size 3
sage: MS = MatrixSpace(GF(3), 7, 7)
sage: MS.transposed is MS
True

sage: M = MatrixSpace(ZZ, 2, 3)
sage: M.transposed
Full MatrixSpace of 3 by 2 dense matrices over Integer Ring

zero()

Return the zero matrix in self.

self must be a space of square matrices. The returned matrix is immutable. Please use copy if you want a modified copy.

EXAMPLES:

sage: z = MatrixSpace(GF(7),2,4).zero_matrix(); z
[0 0 0 0]
[0 0 0 0]
sage: z.is_mutable()
False

zero_matrix()

Return the zero matrix in self.

self must be a space of square matrices. The returned matrix is immutable. Please use copy if you want a modified copy.

EXAMPLES:

sage: z = MatrixSpace(GF(7),2,4).zero_matrix(); z
[0 0 0 0]
[0 0 0 0]
sage: z.is_mutable()
False

sage.matrix.matrix_space.dict_to_list(entries, nrows, ncols)

Given a dictionary of coordinate tuples, return the list given by reading off the nrows*ncols matrix in row order.

EXAMPLES:

sage: from sage.matrix.matrix_space import dict_to_list
sage: d = {}
sage: d[(0,0)] = 1
sage: d[(1,1)] = 2
sage: dict_to_list(d, 2, 2)
[1, 0, 0, 2]
sage: dict_to_list(d, 2, 3)
[1, 0, 0, 0, 2, 0]

sage.matrix.matrix_space.get_matrix_class(R, nrows, ncols, sparse, implementation)

Return a matrix class according to the input.

Note

This returns the base class without the category.

INPUT:

• R – a base ring
• nrows – number of rows
• ncols – number of columns
• sparse – (boolean) whether the matrix class should be sparse
• implementation – (None or string or a matrix class) a possible implementation. See the documentation of the constructor of MatrixSpace.

EXAMPLES:

sage: from sage.matrix.matrix_space import get_matrix_class

sage: get_matrix_class(ZZ, 4, 5, False, None)
<type 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>
sage: get_matrix_class(ZZ, 4, 5, True, None)
<type 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse'>

sage: get_matrix_class(ZZ, 3, 3, False, 'flint')
<type 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>
sage: get_matrix_class(ZZ, 3, 3, False, 'gap')
<type 'sage.matrix.matrix_gap.Matrix_gap'>
sage: get_matrix_class(ZZ, 3, 3, False, 'generic')
<type 'sage.matrix.matrix_generic_dense.Matrix_generic_dense'>

sage: get_matrix_class(GF(2), 2, 2, False, 'm4ri')
<type 'sage.matrix.matrix_mod2_dense.Matrix_mod2_dense'>
sage: get_matrix_class(GF(4), 2, 2, False, 'm4ri')
<type 'sage.matrix.matrix_gf2e_dense.Matrix_gf2e_dense'>
sage: get_matrix_class(GF(7), 2, 2, False, 'linbox-float')
<type 'sage.matrix.matrix_modn_dense_float.Matrix_modn_dense_float'>
sage: get_matrix_class(GF(7), 2, 2, False, 'linbox-double')
<type 'sage.matrix.matrix_modn_dense_double.Matrix_modn_dense_double'>

sage: get_matrix_class(RDF, 2, 2, False, 'numpy')
<type 'sage.matrix.matrix_real_double_dense.Matrix_real_double_dense'>
sage: get_matrix_class(CDF, 2, 3, False, 'numpy')
<type 'sage.matrix.matrix_complex_double_dense.Matrix_complex_double_dense'>

sage: get_matrix_class(ZZ, 3, 5, False, 'crazy_matrix')
Traceback (most recent call last):
...
ValueError: unknown matrix implementation 'crazy_matrix' over Integer Ring
sage: get_matrix_class(GF(3), 2, 2, False, 'm4ri')
Traceback (most recent call last):
...
ValueError: m4ri matrices are only available in characteristic 2
sage: get_matrix_class(Zmod(2**30), 2, 2, False, 'linbox-float')
Traceback (most recent call last):
...
ValueError: linbox-float can only deal with order < 256
sage: get_matrix_class(Zmod(2**30), 2, 2, False, 'linbox-double')
Traceback (most recent call last):
...
ValueError: linbox-double can only deal with order < 8388608

sage: type(matrix(SR, 2, 2, 0))
<type 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense'>
sage: type(matrix(GF(7), 2, range(4)))
<type 'sage.matrix.matrix_modn_dense_float.Matrix_modn_dense_float'>
sage: type(matrix(GF(16007), 2, range(4)))
<type 'sage.matrix.matrix_modn_dense_double.Matrix_modn_dense_double'>
sage: type(matrix(CBF, 2, range(4)))
<type 'sage.matrix.matrix_complex_ball_dense.Matrix_complex_ball_dense'>
sage: type(matrix(GF(2), 2, range(4)))
<type 'sage.matrix.matrix_mod2_dense.Matrix_mod2_dense'>
sage: type(matrix(GF(64,'z'), 2, range(4)))
<type 'sage.matrix.matrix_gf2e_dense.Matrix_gf2e_dense'>
sage: type(matrix(GF(125,'z'), 2, range(4)))     # optional: meataxe
<type 'sage.matrix.matrix_gfpn_dense.Matrix_gfpn_dense'>

sage.matrix.matrix_space.is_MatrixSpace(x)

Return whether self is an instance of MatrixSpace.

EXAMPLES:

sage: from sage.matrix.matrix_space import is_MatrixSpace
sage: MS = MatrixSpace(QQ,2)
sage: A = MS.random_element()
sage: is_MatrixSpace(MS)
True
sage: is_MatrixSpace(A)
False
sage: is_MatrixSpace(5)
False

sage.matrix.matrix_space.test_trivial_matrices_inverse(ring, sparse=True, implementation=None, checkrank=True)

Tests inversion, determinant and is_invertible for trivial matrices.

This function is a helper to check that the inversion of trivial matrices (of size 0x0, nx0, 0xn or 1x1) is handled consistently by the various implementation of matrices. The coherency is checked through a bunch of assertions. If an inconsistency is found, an AssertionError is raised which should make clear what is the problem.

INPUT:

• ring - a ring
• sparse - a boolean
• checkrank - a boolean

OUTPUT:

• nothing if everything is correct, otherwise raise an AssertionError
The methods determinant, is_invertible, rank and inverse are checked for
• the 0x0 empty identity matrix
• the 0x3 and 3x0 matrices
• the 1x1 null matrix [0]
• the 1x1 identity matrix [1]

If checkrank is False then the rank is not checked. This is used the check matrix over ring where echelon form is not implemented.

Todo

This must be adapted to category check framework when ready (see trac ticket #5274).


text:
# Nodes in a binary search tree that span a range

I have a binary search tree of height $$h$$ with an integer in each leaf. I also have a range $$[\ell,u]$$. I want to find a set of nodes that span the range $$[\ell,u]$$, i.e., a set $$S$$ of nodes such that the leaves under $$S$$ form all (and only) those leaves containing integers in the range $$[\ell,u]$$. How large does $$S$$ need to be, in the worst case, as a function of the height $$h$$? How do I find such a set explicitly?

I'm assuming you have parent pointers, you can probably avoid them by maintaining a couple stacks though.

Find the extremal two nodes $$\ell \leq p \leq q \leq u$$ and their common ancestor $$a$$ in $$O(h)$$ time. If nodes $$p$$ and $$q$$ are the same, return $$S = \{p\}$$.

While $$p$$ is the left child of its parent and its parent is not the common ancestor, let $$p := \text{parent}(p)$$. Similarly for $$q$$ but with being the right child as criterion.

Now if $$p$$ and $$q$$ are both the direct children of $$a$$ let $$S = \{a\}$$ and you are done. Otherwise initialize $$S = \{p, q\}$$ and repeat:

1. $$p := \text{parent}(p)$$
2. If $$p = a$$ break.
3. Add the right child of $$p$$ to $$S$$.

And to finish up, do the same for $$q$$ but adding the left children instead. Note that the first iteration of the above loop can add $$p$$ or $$q$$ to the set while it is already in it. If you use an array instead of a proper set you want to make a special case for the first iteration.

In the worst case this adds $$2h + O(1)$$ elements to $$S$$. This can be necessary too, consider a full binary tree where the range includes all but the smallest and biggest node.


text:
# Wind energy is gaining increased attention, so there is in turn an increased interest in windmill...

###### Question:

Wind energy is gaining increased attention, so there is in turn an increased interest in windmill technology. Because the windmill blades (vanes) rotate about a central axis, one of the most important physical properties of a windmill is its moment of inertia. Center of mass Given is a picture of a typical windmill, where the geometry and center of mass of one of the vanes is illustrated. If the moment of inertia about axis A is 343 kg.m2 and about axis B is 8330 kg.m, calculate the moment of inertia about the axis of rotation for the entire rotating assembly. The mass of each vane is 411 kg. The distance from the center of mass of the vane to axis B is kı = 2.45 m. The distance from the center of mass of the vane to the center of the windmill hub is k2 = 3.80 m. (Ignore the hub and assume the vanes are flat.) moment of inertia: kg · m2 A strong wind blows such that the windmill begins to rotationally accelerate.

#### Similar Solved Questions

##### A hot air balloon carrying a basket lifts off from rest and floats upward. The balloon...
A hot air balloon carrying a basket lifts off from rest and floats upward. The balloon material is made of silk and holds a large amount of hot air. Choose the option which best describes the Fy OB - Wait - Whot air Wbasket = ma OB - Wsilk + Wbasket W cold air 30 W cold air Whot air = ma B Wcold air...
##### [H30+] and [OH-] In Solutions OH 4x 10-12 M (OH 3x 10 M L но 8...
[H30+] and [OH-] In Solutions OH 4x 10-12 M (OH 3x 10 M L но 8 x 10-10 M (OH 7 x 10-13 M OH [- но! 4 x 10-2 M 8 x 10 M он 1 6 x 10-3 M 1 x 107 M [ но Acidic Neutral Basic...
##### Why should we evaluate euthanasia patients mental health state?
why should we evaluate euthanasia patients mental health state?...
##### How do you use the limit comparison test for sum( n^3 / (n^4-1) )  from n=2 to n=oo?
How do you use the limit comparison test for sum( n^3 / (n^4-1) )  from n=2 to n=oo?...
##### 4. An underwater pipe of radius 0.5m is located h = 1.5m under the water surface....
4. An underwater pipe of radius 0.5m is located h = 1.5m under the water surface. What is the resultant force on the cap located at the end of the pipe?...
##### Below are transactions related to Whispering Company. (a) The City of Pebble Beach gives the company...
Below are transactions related to Whispering Company. (a) The City of Pebble Beach gives the company 5 acres of land as a plant site. The fair value of this land is determined to be $88,510. (b) 13,000 shares of common stock with a par value of$52 per share are issued in exchange for land and build...
##### How many octaves higher is the frequency in column B than the frequency in column A?...
How many octaves higher is the frequency in column B than the frequency in column A? A / B a. 250 Hz / 500 Hz b. 250 Hz / 4000 Hz c. 100 Hz / 400 Hz d. 1414 Hz / 5656 Hz * Please explain how you would calculate this!...
##### 14. Electromagnetic radiation human eye. How many photo ectromagnetic radiation with a wavelength of 522 nm...
14. Electromagnetic radiation human eye. How many photo ectromagnetic radiation with a wavelength of 522 nm appears as green light to the n eye. How many photons are produced in each pulse by a laser that emits 1.3x10 J of energy in a pulse of light at this wavelength....
##### Please show calculations! Analyzing and Computing Average Issue Price and Treasury Stock Cost Assume this is...
Please show calculations! Analyzing and Computing Average Issue Price and Treasury Stock Cost Assume this is the stockholders' equity section from the Campbell Soup Company balance sheet. Shareholders' Equity (millions, except per share amounts) August 3, 2008 July 29, 2007 Preferred stock: ...
##### What is the P/O ratio for the oxidation of NADH in electron transport chain? 2 1.5...
What is the P/O ratio for the oxidation of NADH in electron transport chain? 2 1.5 1 2.5...
##### A) if three samples of KHP weighing , 31.21 mg +- 4.3 % ; 81.4 mg...
a) if three samples of KHP weighing , 31.21 mg +- 4.3 % ; 81.4 mg +- 7.12% and 213.2 mg +- 8.4% were added together, determine the total mass of KHP and its absolute uncertainty. Express the anwer with the correct number of significant figures. b) If the mass of KHP from part(a) of this problem were...
##### Question 18 2.95 pt Given the following graph, find any decreasing interval(s). Write your answer in...
Question 18 2.95 pt Given the following graph, find any decreasing interval(s). Write your answer in interval notation. Separate any intervals with a semicolon (:) where needed. 55 T 50 45 40 35 30 25 20 15 10 3 10...
##### How do you solve 8/(x-4) -3=1/(x-10)?
How do you solve 8/(x-4) -3=1/(x-10)?...