text:
# Image processing optimization

I'm using Winforms C# .NET 3.5. I'm getting frames, and this is how I handle them:

    delegate void videoStream_NewFrameDelegate(object sender, NewFrameEventArgs eventArgs);
public void videoStream_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
{
if (this.InvokeRequired)
{
videoStream_NewFrameDelegate del = new videoStream_NewFrameDelegate(videoStream_NewFrame);
this.Invoke(del, new object[] {sender, eventArgs} );
}
else
{
Rectangle rc = ClientRectangle;
Bitmap bmp = new Bitmap(rc.Width, rc.Height);
Graphics g = Graphics.FromImage((Image)bmp);
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;
g.DrawImage((Bitmap)eventArgs.Frame, rc.X+10, rc.Y+10, rc.Width-20, rc.Height-20);

g.Dispose();
this.Image = (Image)bmp;
}
}
}

Is there any way to optimize or improve performance?

I'm getting low performance when my image is 320x240 and I'm stretching it to 1280x1024, But the same image on 640x480 and stretching to 1280x1024 wont get much loss in performance.

I tried to use WPF and still same performance loss. That is weird because WPF is supposed to use DirectX and be fast in image processing.

Here is my WPF code:

    delegate void videoStream_NewFrameDelegate(object sender, NewFrameEventArgs eventArgs);
public void videoStream_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
{
if (!this.Frame.Dispatcher.CheckAccess())
{
videoStream_NewFrameDelegate del = new videoStream_NewFrameDelegate(videoStream_NewFrame);
this.Frame.Dispatcher.Invoke(del, new object[] { sender, eventArgs });
}
else
{
Bitmap bmp = (Bitmap)eventArgs.Frame.Clone();
IntPtr hBitmap = bmp.GetHbitmap();
BitmapSource img = Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
bmp.Dispose();
GC.Collect();

this.Frame.Source = img;
}
}
}

-
Use Managed D2D withing WPF window –  Artur Mustafin Sep 21 '11 at 4:33
@Artur You got an example ? –  Danpe Sep 21 '11 at 10:36

I tried to use WPF and still same preformence lose.. that is weird because WPF suppose to use DirectX and be fast in image proccessing.

Except, in the WPF version, you are cloning a Bitmap (which has nothing to do with WPF) and then calling Imaging.CreateBitmapFromHBitmap, which eventually resolves to a call to:

[DllImport("WindowsCodecs.dll", EntryPoint="IWICImagingFactory_CreateBitmapFromHBITMAP_Proxy")]
internal static extern int CreateBitmapFromHBITMAP(IntPtr THIS_PTR, IntPtr hBitmap, IntPtr hPalette, WICBitmapAlphaChannelOption options, out BitmapSourceSafeMILHandle ppIBitmap);

Now I don't know what that method is doing, but it may very well be copying the data again, but perhaps not. Either way, your WPF method is performing at least one clone of the entire image and your WinForms version is not.

That's not really the meat of it though. You haven't even posted benchmark results, so you need to do that first before assuming any one part of code is "slow", and you will have a hard time optimizing until you have that answer. You're two versions aren't even identical in output; the WinForms version performs HighQualityBilinear interpolation, which is certainly going to take a significant amount of time.

You need to tell us what you requirements are. I ran a quick test with the following code using a 320x240 size image, and then again at 640x480:

public Form1()
{
InitializeComponent();
}

private TimeSpan RunTest( int sampleSize )
{
var sw = Stopwatch.StartNew();
var baseImg = new Bitmap( @"C:\TestImage.jpg" );
Bitmap bmp = null;
for( int i = 0; i < sampleSize; ++i )
{
var rect = picBox.ClientRectangle;
bmp = new Bitmap( rect.Width, rect.Height );
using( Graphics g = Graphics.FromImage( bmp ) )
{
g.InterpolationMode = InterpolationMode.HighQualityBilinear;
g.DrawImage( baseImg, rect );
}

picBox.Image = bmp;
// the call to Invalidate() that you have is not needed.
}

sw.Stop();
return TimeSpan.FromMilliseconds( sw.ElapsedMilliseconds );
}

private void picBox_Click( object sender, EventArgs e )
{
int iterations = 100;
var time = RunTest( iterations );
MessageBox.Show( String.Format(
"Elapsed: {0}, Average: {1}",
time.TotalMilliseconds,
time.TotalMilliseconds / iterations ) );
}

I then performed another test using the default InterpolationMode. Under a release build that gave me the following results:

320x240 1. High quality interpolation: Total: 3122ms, Average: 31.22ms, FPS: 32 2. Default interpolation: Total: 2165ms, Average: 21.65ms, FPS: 46

640x480 1. High quality interpolation: Total: 3963ms, Average: 39.63ms, FPS: 25 2. Default interpolation: Total: 2256ms, Average: 22.56ms, FPS: 44

Are you saying that 32 frames per second is not good enough for your application? Is 42 ok and is it alright to remove the high quality rendering? You need to provide more details. You can't expect us to optimize your code with no target requirement in mind. Also, as you can see, your claim that the performance is better with large images does not appear to be true, though the difference without high quality bilinear rendering is negligible.

If you can forego the Bilinear interpolation you can simply set the StretchMode of the PictureBox to Stretch and just set the Image property to the Frame property of the event args object and be done with it. This will be significantly faster.

-
Hey! thx alot for the awosome answer ! i added some test to my questions. My event is getting called when a WebCam frame is arrived. I tried what you said with the stretch mode but i get Empty Image.. this.Image = (Bitmap)eventArgs.Frame; I dont know why but when i'm taking the 320x240 picture and stretching it in a full screen PictureBox i get Long delay, but the tests you you do shows only 4500ms on full screen, and 3300 on normal size.. but in the eye it looks like 3 seconds delay.. –  Danpe Sep 14 '11 at 18:41
@Danpe: My timings may have been a bit misleading; they don't take into account the time that the PictureBox takes to redraw itself, which is bound to be significant. –  Ed S. Sep 19 '11 at 20:38
@Ed S.: your "sample" is not useful, and do not provide significant performance improvements compared to the original post. Is any case, it will have almost the same timings, because it usese the same managed function calls –  Artur Mustafin Sep 20 '11 at 1:44
@Ed S.: You did not turn .SizeMode to StretchImage in a PictureBoxControl. I have an 1080p image in a 200x200 box, and my code as is is 75% faster, than your "sample", with timings, inclding .Image assigments. So your code sucks –  Artur Mustafin Sep 20 '11 at 2:04
@Artur: Well put sir, you are obviously extremely mature and talented. Also, my code was posted in an attempt to get some baseline timings for the OP's code and then I asked some more questions. Nowhere did I say that it was an improvement. Please refrain from crying over my downvote on your response. Go grab a few rep points and downvote me back if it makes you feel better. –  Ed S. Sep 20 '11 at 2:09

format: plain


text:
# The Kickstarter Principle: Crowdfunding doesn’t work without transparency and trust

Every now and then, there’s a truly heart-warming story about crowdfunding, like the case of the school-bus monitor who was tormented by kids on her bus and wound up with a windfall of $700,000. This week there was another story that seemed just as inspirational, when a mother set up a campaign so her 9-year-old daughter could go to computer camp and design a video game to prove to her brothers that she was smart — a plea that has so far raised more than$20,000. After some evidence appeared that showed the woman to be wealthy, however, the attitude toward her project quickly changed.

The original story, as told in first person on the Kickstarter page, is a great feel-good tale: Mackenzie Wilson talks about how she boasted to her older brothers that she could design a video game, and they didn’t believe her. So she asked her mother Susan if she could go to a STEM camp (which stands for science, technology, engineering and mathematics) at a local university, where she would be able to study computer games and eventually design one of her own. The original goal for the campaign was just $829. ## An inspiring story that turned sour After the campaign got picked up on Twitter and elsewhere, Mackenzie and her mother raised more than$10,000 in less than 24 hours, and that figure quickly grew to more than $22,000. As with the bus-monitor story, many people seemed inspired to donate far more than was required because they wanted to support the girl and her desire to do something positive. But what happened next shows just how quickly the attitude toward such crowdfunding efforts can reverse itself. As reported by the Daily Dot, a member of Reddit raised red flags about the campaign with a post about Mackenzie’s mother — including the fact that she was a self-declared multimillionaire entrepreneur who sold a company she co-founded to Kinkos for$100 million, was an entrepreneur-in-residence at Georgetown University, and ran several different businesses, including one that helps banks get money back from customers who default on their loan payments.

The post also included screenshots of a series of identical tweets asking celebrities such as Lady Gaga to promote her daughter’s campaign, something that is against Kickstarter rules.

Wilson told the Huffington Post that she didn’t expect this kind of reaction, and that she never claimed the family couldn’t afford to send her daughter to computer camp. She said that she viewed it as a way of encouraging Mackenzie to stand up for herself and raise her own money for things, like a lemonade stand might have in the past. She also pointed out that there is nothing in the Kickstarter rules that says it is only for people who can’t afford the thing they are raising money for, saying: “I don’t think it’s a need-based system.”

As the Reddit campaign against her picked up speed, Wilson said she was the target of death threats and offensive comments, and that she was afraid to let her daughter find out about how much anger her campaign had caused. In the comments on the Kickstarter page, she said: “I wish I could find a way to make this stop. I’m tired of fighting.”

## Crowdfunding campaigns rely on trust

What’s fascinating to look at is how the tone of the comments on the Kickstarter campaign changes over time: at first, they are resoundingly positive, cheering for Mackenzie and her mother for encouraging her to do this. Then after the information about Wilson’s background gets posted, they turn more negative — but there are still lots of people telling her she is doing the right thing. Over time, however, the number of negative responses increases, and some commenters start to question whether it was even Mackenzie’s idea, and criticize Wilson for saying she plans to identify her attackers.

For me at least, this episode feels a lot like what happened to musician Amanda Palmer when she raised more than \$1 million from her fans in less than two weeks for a new album and tour. Even though she detailed exactly how she would be using the money, there were still questions raised when she started to invite musicians to play with her for free as part of the tour. She eventually had to respond to those criticisms publicly and repeatedly, and pay the musicians the standard rate.

The lesson from both of these incidents is the same, I think. If you are going to appeal to the crowd for support, then you are essentially striking a bargain with them: they provide money, but you have to do more than just provide whatever the end product is. You have to be as open and transparent as possible and do whatever you can to maintain the trust of those supporters, and that changes the dynamics of the situation completely. And once that trust is lost, the game is effectively over.

Post and thumbnail image courtesy of Flickr user Christian Scholz


text:
# Bracket-lib - Version 0.8.2 Updates

I’ve updated bracket-color, bracket-geometry, bracket-random, bracket-noise, bracket-algorithm-traits and bracket-pathfinding on crates.io. The terminal and master library will update as soon as I’ve got confirmation that problems with display scaling on Macs are resolved.

These releases don’t change any existing APIs. Highlights include:

• bracket-color has gained a few more internal tests, and bugfixes.
• bracket-geometry uses the latest version of Ultraviolet, which in turn uses wide for fast SIMD calculations.
• bracket-random now exposes a get_rng function to allow you to use the underlying random system.
• bracket-random has updated its back-end to benefit from fixes and performance improvements.
• bracket-noise is a bit more stable on cellular noise.
• bracket-algorithm-traits is much more forgiving of smallvec versions, making coexistence with other systems easier.
• bracket-pathfinding has new recursive shadowcasting Field-of-View code. Quite a bit faster.
• bracket-pathfinding has improved the A-Star implementation. It’s more accurate AND a lot faster.
Share


text:
lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: lilypond consistent crash

 From: Trevor Bača Subject: Re: lilypond consistent crash Date: Sun, 23 Sep 2007 12:11:27 -0500

On 9/23/07, Adam James Wilson <address@hidden> wrote:
> Hi folks,
>
> I'm pretty frustrrated at the moment - wondering if anyone has
> exeperienced a similar problem.
>
> I unfortunately don't have a small snippet to describe the problem,
> because it seems to arise from volume/complexity. . .
>
> Here's what I'm doing:
>
> I'm using a global "invisible" voice at 3/8 in all staves of my score.
>  I'm using proportional notation, strict stretching and spacing, and
> force a line break at every 4 measures in the global voice
>
> I have several actual voices in different staves all barred at
> different tempos, which are constantly changing: for example, 71 bars
> of 3/8 in the space of 49 bars of the global voice.  I'm using
> compressMusic to accomplish this.
>
> Timing, barline engraver, and rehearsal marks are all on the staff
> context, since each staff has a different tempo.  At points some of
> the barlines sync up, and then move off again.
>
> Since my piece has reached a certain size, lilypond will chug away at
> the score and then simply stop, without writing .ps or .pdf files.  I
> tried with both mac os X 10.4 (PPC) and windows XP versions of
> 2.11.32.  Memory keeps getting consumed - up to 387MB in one trial -
> and the console prints about a zillion of the following warnings
> before quitting:
>
> programming error: minimise_least_squares ():  Nothing to minimise
> This means that vertical spacing is triggered
> before line breaking
> continuing, cross fingers
>
> I've sort of committed to Lily as a medium for what I'm doing - no
> other software seems to be able to do multi-tempo proprtional
> notation; however, I'm only a few minutes into the piece and have
> encountered this rendering roadblock.
>
> Rendering the piece in chunks will not work (unless someone knows a
> trick) because so many bars are breaking at a line break (this is what
> I want - horizontal consistency in time as well as relative temporal
> consistency between parts) - there are almost no places where a page
> finishes with all parts together.
>
> I'm wondering if this has anything to do with the timing bug I
> discovered whereby compressMusic doesn't compress capital-R rests
> properly without the addition of a funky \time ratio; perhaps there
> are other hidden problems with compressMusic?
>
> Any help would be greatly appreciated - I'm on a deadline (end of
> October) to finish this piece; if a fix requires sponsorship I'm
> willing to kick in.

Hi Adam,

I was just taking a break from partitioning my current inputfile due
to this same bug whenI clicked over and saw your mail.

Some time ago -- unfortunately I haven't been able to pinpoint the
exact release -- a filesize-related rendering problem did indeed enter
the 2.11 development releases. I opened Google #433
(http://code.google.com/p/lilypond/issues/detail?id=433) and both Joe
and Nicolas jumped to help.

I think Joe found that the problem difficult to reproduce except under
OS X Intel, so Nicolas very graciously ran my offending file (under OS
X Intel) and was indeed able to reproduce the same segementation
fault. However, it seems that what's needed is to run one of the
offending files under gdp with a version of lily that still has all
the debug messages compiled in. Nicolas got very close; I'm further
away because I don't have the chops to build an unstripped version
from source at the moment.

So I'm pretty sure that's where the issue lies. The gurus know about
the problem but are very busy  and so we may still be a bit away from
the fix. FWIW, I think we're not the only ones experiencing the
problem; Aurélien mailed me off the list to report what appears to be
the same problem and then added a comment to #433 afterwards.

So, what to do as a workaround in the meantime?

I've just now partitioned the trio that I'm working on (which likewise
has an October deadline) into three separate inputfiles. And that
seems to be working. I can get about 100 measures of extremely dense
music per file before the segementation fault shows up ... and the
piece is 230 measures. It took about a day and half to get the
partitioning right because I had to manually sever spanners and
octavation commands and insert dummy \bar "" breaks to satisfy
line-breaking etc on either side of the breaks in the file. But it did
indeed work.

So is there a way we can get your inputfile broken into
non-segfault-inducing chunks as a workaround? My guess is that your
line-breaks fall neatly at barlines in *one* of the staves in your
score but at extremely complex midmeasure metrical points in the other
staves of your score; is this the problem?

If so, you should be able to insert dummy bars with \bar "" at
precisely the points where you need ilne-breaking to occur in the
"messy staves". Some incantation like s1 * 12/59 \bar "" should work
to, for example, position a breakable point at 12/59ths of a whole
note into the middle of one of the "messy" measures. Does this help?

There *should* be a way to partition your inputfile and get your
through the transition period. If you can't get it to work, cut out a
snippet that shows a place where you'd like to sever the file (but are
unable to), send back to me (cc the list) and I'll help you get it.
Also, keep your chin up -- Orm (Finnendahl), Víctor (Adán) and I have
all used the proportional package with remarkably successful results
that would be damn near impossible in the other notation packages;
your scores look like they fall into the same category and I strongly
encourage you to work through the current trouble spot.

Gurus - everyone is clearly busy (and I get the feeling that the
limiting factor right now is time not money), but I'll go ahead and
second Adam's offer for sponsorship to move past the current segfault
bug.

Also, I've switched this thread over to -devel and added the folks I
mentioned up above.

--
Trevor Bača
address@hidden

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]


text:
# Evaluate integral from 0 to 2 of 1/(1-x^2) with respect to x

Factor the numerator and denominator of .
Rewrite as .
Since both terms are perfect squares, factor using the difference of squares formula, where and .
Write the fraction using partial fraction decomposition.
Simplify.
Split the single integral into multiple integrals.
Since is constant with respect to , move out of the integral.
Let . Then . Rewrite using and .
Let . Find .
Differentiate .
By the Sum Rule, the derivative of with respect to is .
Since is constant with respect to , the derivative of with respect to is .
Differentiate using the Power Rule which states that is where .
Substitute the lower limit in for in .
Substitute the upper limit in for in .
The values found for and will be used to evaluate the definite integral.
Rewrite the problem using , , and the new limits of integration.
The integral of with respect to is .
Since is constant with respect to , move out of the integral.
Let . Then , so . Rewrite using and .
Let . Find .
Rewrite.
Divide by .
Substitute the lower limit in for in .
Subtract from .
Substitute the upper limit in for in .
Simplify.
Multiply by .
Subtract from .
The values found for and will be used to evaluate the definite integral.
Rewrite the problem using , , and the new limits of integration.
Move the negative in front of the fraction.
Since is constant with respect to , move out of the integral.
Simplify.
Combine and .
Move the negative in front of the fraction.
The integral of with respect to is .
Substitute and simplify.
Evaluate at and at .
Evaluate at and at .
Remove parentheses.
Evaluate.
Simplify each term.
Use the quotient property of logarithms, .
The absolute value is the distance between a number and zero. The distance between and is .
The absolute value is the distance between a number and zero. The distance between and is .
Divide by .
Simplify by moving inside the logarithm.
Use the quotient property of logarithms, .
The absolute value is the distance between a number and zero. The distance between and is .
The absolute value is the distance between a number and zero. The distance between and is .
Divide by .
The natural logarithm of is .
Multiply .
Multiply by .
Multiply by .


text:
# How do you solve and graph -t/12>=6?

Sep 18, 2017

$t \le - 72$
$- \frac{t}{12} \ge 6$
We need to multiply both sides by $\textcolor{red}{\frac{12}{-} 1}$
$\textcolor{red}{\frac{12}{-} 1} \cdot \left(- \frac{1}{12} t\right) \ge \textcolor{red}{\frac{12}{-} 1} \left(6\right)$
$t \le - 72$


text:
Intended for healthcare professionals

CCBYNC Open access
Research

# Performance of UK National Health Service compared with other high income countries: observational study

BMJ 2019; 367 (Published 27 November 2019) Cite this as: BMJ 2019;367:l6326
1. Irene Papanicolas, associate professor of health economics1 2 3,
2. Elias Mossialos, Brian Abel-Smith professor of health policy1,
3. Anders Gundersen, senior research project coordinator3,
4. Liana Woskie, PhD candidate and research fellow1 2 3,
5. Ashish K Jha, K T Li professor of global health, director23
1. 1Department of Health Policy, London School of Economics and Political Science, London, UK
2. 2Department of Health Policy and Management, Harvard T H Chan School of Public Health, Boston, MA, USA
3. 3Harvard Global Health Institute, Cambridge, MA, USA
1. Correspondence to: I Papanicolas I.N.Papanicolas{at}lse.ac.uk
• Accepted 25 October 2019

## Abstract

Objective To determine how the UK National Health Service (NHS) is performing relative to health systems of other high income countries, given that it is facing sustained financial pressure, increasing levels of demand, and cuts to social care.

Design Observational study using secondary data from key international organisations such as Eurostat and the Organization for Economic Cooperation and Development.

Setting Healthcare systems of the UK and nine high income comparator countries: Australia, Canada, Denmark, France, Germany, the Netherlands, Sweden, Switzerland, and the US.

Main outcome measures 79 indicators across seven domains: population and healthcare coverage, healthcare and social spending, structural capacity, utilisation, access to care, quality of care, and population health.

Results The UK spent the least per capita on healthcare in 2017 compared with all other countries studied (UK $3825 (£2972; €3392); mean$5700), and spending was growing at slightly lower levels (0.02% of gross domestic product in the previous four years, compared with a mean of 0.07%). The UK had the lowest rates of unmet need and among the lowest numbers of doctors and nurses per capita, despite having average levels of utilisation (number of hospital admissions). The UK had slightly below average life expectancy (81.3 years compared with a mean of 81.7) and cancer survival, including breast, cervical, colon, and rectal cancer. Although several health service outcomes were poor, such as postoperative sepsis after abdominal surgery (UK 2454 per 100 000 discharges; mean 2058 per 100 000 discharges), 30 day mortality for acute myocardial infarction (UK 7.1%; mean 5.5%), and ischaemic stroke (UK 9.6%; mean 6.6%), the UK achieved lower than average rates of postoperative deep venous thrombosis after joint surgery and fewer healthcare associated infections.

Conclusions The NHS showed pockets of good performance, including in health service outcomes, but spending, patient safety, and population health were all below average to average at best. Taken together, these results suggest that if the NHS wants to achieve comparable health outcomes at a time of growing demographic pressure, it may need to spend more to increase the supply of labour and long term care and reduce the declining trend in social spending to match levels of comparator countries.

## Introduction

The UK’s spending on healthcare has been constrained for some time, with slow growth in spending in a setting of steadily increasing demand as the population ages and other safety nets for the older population are cut.1 From 2010 to 2017, the number of people aged over 80 rose by 340 000. In the same period, real public spending on social care fell by 1% and spending on adult social care fell by 6.4%.2 As a result of the great fiscal pressure facing the National Health Service (NHS), there has been an increased effort to improve the efficiency of the health system by various means including, but not limited to, reductions in reimbursement rates, staff freezes, and cuts to administrative and prescribing costs.34 Since 2009 productivity in the NHS has risen faster than in other sectors of the British economy, but recent strikes have brought matters such as staffing gaps, inadequate pay, and patient safety to global attention.5

The UK NHS is not the only health system facing the challenge of having to meet growing demand from patients while under pressure to reduce healthcare costs.6 However, few studies have looked abroad to understand whether other healthcare systems can provide lessons for the NHS.47 Where comparisons exist, they often focus on specific aspects of the system, such as spending, cancer care, or quality, and show a mixed picture of relative performance. Fortunately, new national data have become available over the past few years that allow for a careful comparison not just of spending but also of broader health system performance including access, quality, and outcomes. Comparative data on how the UK performs relative to other high income countries across a set of important metrics would be helpful but have been lacking.

Therefore, in this study, using comparable data from several international organisations including the Organization for Economic Cooperation and Development (OECD), we sought to compare the UK health system with those of nine other countries across seven main domains: population and healthcare coverage, health and long term care spending, structural capacity, utilisation, access, quality, and population health. Our hypothesis was that if austerity has harmed the NHS, we would see this in higher population and patient dissatisfaction, drops in access and utilisation, and worsening quality and population health status. If, however, we continue to see comparable performance and trends of performance in line with other countries also trying to meet changes in sociodemographics, this probably suggests a health system that has been able to cut waste and operate more efficiently than other high spenders. Unfortunately, comparative detailed data on the performance of the NHS across the four constituent countries of the UK (England, Scotland, Northern Ireland, and Wales), where the NHS is structured differently, are not available. Therefore, we examined UK performance as a whole. Given the greater population size of England, the performance metrics we report will be dominated by the performance of the English NHS.

## Methods

### Selection of study and comparator countries

We examined the UK and nine comparator high income countries. Data for the UK represent the NHS and not the privately financed healthcare sector. Moreover, although the NHS is structured differently across the four countries of the UK, particularly when it comes to the provision of social care (often referred to as long term care), in this paper we consider the performance of all these systems together. Given the greater population size of England, the UK performance metrics reported in this study are dominated by the performance of the English NHS.

We chose the comparator countries because they are all high income countries, are members of the G12, and have populations with similar demographic characteristics that face similar burdens of illness, but also have healthcare systems that are structured in different ways.8 On the basis of these criteria, we compared the UK with the US, Canada, Germany, Australia, Sweden, France, Denmark, the Netherlands, and Switzerland. The comparator countries represent different geographical areas and diverse health system structures. In addition, we compared all performance metrics with the OECD average and the EU average to allow for a broader comparison.

### Data sources

Data came from a range of databases compiled by international organisations, with most coming from the OECD. Data on spending, structural capacity, workforce, utilisation, access, and quality came from OECD.stat and the OECD Health at a Glance reports. Additional data came from the World Bank, the Institute for Health Metrics Evaluation, and Eurostat. We gathered perceptions of health systems, staff satisfaction, unmet need, time spent with general practitioner, patient-general practitioner experiences, care continuity, and waiting time indicators from various Commonwealth Fund international surveys, including the Surveys of Primary Care Physicians, the Health Policy Surveys of Older Adults, and the International Health Policy Surveys.

We translated all data on remuneration into US dollar equivalents, with exchange rates based on 2016 purchasing power parities of national currencies.9 When data were not available for a given country, or more accurate country level estimates were available, we used country specific data sources. For example, to highlight the differences in total healthcare expenditure in the UK between the OECD’s System of Health Accounts (SHA) classification of healthcare spending and the previous accounting methods used, we used health spending data from the Office for National Statistics. Detailed descriptions of all variables and what they capture is included in the supplementary technical appendix.

### Selection of variables

To better understand the UK’s healthcare performance relative to other high income countries, we reviewed a range of variables. We first examined comparative data on the size and make-up of the populations of the different countries and their rates of healthcare coverage. We then compared spending on health and long term care, including the proportion of spending coming from public and private sources. As countries organise their benefit packages for health and long term care differently, with some countries drawing different boundaries between what is and is not funded from the healthcare budget, we used data from the OECD’s SHA classification as a basis for comparison. This includes all spending on health related components of long term care, regardless of which national budget they are included in or whether they are public, private, or out of pocket.

Next, we examined comparative inputs, including workforce and structural capacity such as hospital beds, which aside from contributing to direct costs may also influence maintenance costs or the cost of using equipment. Given current debates in the UK about migration, we also included descriptive statistics on the percentage of migrants represented in the healthcare workforce and in the general population. In recent years, policy makers in the UK have advocated for more efficiency gains in the healthcare system or, in other terms, the transformation of existing healthcare expenditures into the same amount of, or more, health system outcomes. We therefore extended our analysis to examine a range of intermediate outputs—namely, access and utilisation, patients’ and general practitioners’ experience, and quality of care—as well as indicators of population health status, such as life expectancy and mortality amenable to healthcare to examine the change in performance of these areas over a period of reduced growth in healthcare spending. We standardised all data on structural capacity and/or utilisation to the population or patient, and all health service outcome data were adjusted for age and sex by the OECD. Details on all indicators can be found in the technical appendix.

To provide a broader context of overall factors that can contribute to differences in healthcare spending and consider the UK debate about recent austerity measures and their effect on NHS demand, we also examined social spending more broadly (that is, spending on social programmes, specifically on unemployment, family, old age, incapacity, survivors, housing, and active labour market programmes), as well as demographic differences, risk factors, and prevalence of disease. In line with previous international comparisons, the healthcare system included all groups of which the primary intent is to improve health.10

This approach resulted in the presentation of a total of 79 indicators across seven domains: population and healthcare coverage, health and long term care spending, structural capacity, access to care, utilisation, quality of care, and population health. In each domain, we selected measures that were available across most of the countries in the analysis. In the area of quality, the focus was on indicators that captured quality of prevention, primary care, and inpatient care, across the areas of appropriateness, effectiveness, experience, and safety. In the area of access, we explored variations related to waiting times and unmet need for healthcare.

The focus of our analysis was on indicators from 2017, as well as the trends in data from 2010 when available and comparable. If data from either 2017 or 2010 were not available, we used the nearest available year (for example, data from 2016 instead of 2017). We note aspects of comparability and timeliness for each indicator in the technical appendix. In each table, we present the average of each indicator across all 10 countries including the UK, along with the averages of OECD and European Union member countries.

### Patient and public involvement

There was no patient or public involvement in this research.

## Results

### Population and healthcare coverage

The make-up of the UK population, in terms of size of total population and the percentage of the population over 65 years of age was similar to the study average (population in UK, 66.4 million; study average, 64.7 million; population over 65 in the UK, 18%; study average, 19%) (table 1). Rates of growth for these metrics in the UK were similar to the study average as well. The proportion of the population over 65 in the UK was slightly greater than the mean of the OECD member nations (17%), but equal to the mean of EU member nations (18%). The UK reported among the lowest rate of adults with multiple chronic conditions (UK, 14%; study average, 18%). The percentage of the total population born outside of the country was slightly lower in the UK than in our comparator countries in 2017 (UK, 14.2%; study average, 17.1%), although it was quite close to the average OECD and EU member state (OECD average, 13.8%; EU average, 13.2%). However, the increase in the foreign born population from 2010 was above the average among comparators (UK, 2.9%; study average, 1.8%), and much higher than both the OECD average (0.7%) and the EU average (0.9%), particularly among the population coming from the EU. Among comparator countries, the UK had among the highest proportions of the foreign born population coming from the EU, after Switzerland, although this was in line with the averages of all OECD and EU member states.

Table 1

Healthcare coverage and population statistics for UK and comparator countries, 2017 and change from 2010

View this table:

All countries with the exception of the US were similar in terms of having nearly 100% of the population with healthcare coverage (table 1). Rates of private health insurance coverage varied widely across countries. This is largely explained by the different function of private insurance coverage across the countries. For example, private insurance in the UK largely reflects duplicative private insurance policies that allow people to access private healthcare in addition to the NHS. In Germany, the private insurance is mostly substitutive and reflects contributions from people who have opted out of the statutory health insurance system and whose main form of coverage is the private healthcare system. In France, health insurance reflects complementary add-on policies that allow individual reductions in co-pays or increased accessibility to particular drugs, services, or both. However, private insurance coverage in the UK was below the average of the comparator countries, as well as the OECD and EU member state average (UK, 10%; study average, 52%; OECD average, 35%; EU average, 32%) and had declined over the previous decade (UK, −1%; study average, 1%; OECD average, 2%; EU average, 3%). These numbers do not reflect the range of services covered or the depth of coverage.

### Utilisation

The UK had slightly fewer total consultations with doctors per capita compared with other comparator countries (UK, 5; study average, 5.7; OECD, 6.4; EU, 6.8 visits/person/year) and lower rates of all cause hospital discharges (UK, 12 354; study average, 14 919; OECD, 15 235; EU, 16 218 discharges/100 000 population), which were also decreasing at a faster rate than the average (table 4). Primary care physicians in the UK reported spending the least amount of time with patients, with 0% spending 25 or more minutes with patients (study average, 15%), 8% reporting spending 15-25 minutes (study average, 45%), and 92% reporting spending less than 15 minutes with their patients (study average, 38%). The rate of influenza immunisation among the population over age 65 was higher in the UK than in all comparator groups (UK, 72.6%; study average, 54.1%; OECD 43.2%; EU 37.2%) with the exception of Australia (74.6%). Rates of breast cancer screening for women aged 50-69 and cervical cancer screening for women aged 20-69 were higher in the UK than the average for the comparator countries (breast: UK, 75.1%; study average, 66.5%; OECD, 61.5%; EU 63.9%; cervical: UK, 75.4%; study average, 71%, OECD, 63.6%; EU, 64.9%). However, both UK screening rates decreased at faster rates than the study average (table 4). Average length of hospital stay in the UK was 6.8 days, which was very close to the study average of 6.7 days and lower than the OECD average (7.3 days) and the EU average (7.4 days). Length of hospital stay for childbirth was 2.5 days in the UK, which was lower than the study average (3.2 days), the OECD average (3.5 days), and the EU average (3.6 days).

Table 4

Healthcare utilisation in UK and comparator countries, 2017 and change from 2010

View this table:

Waiting times across the UK were for the most part comparable to the average of the 10 countries, although considerable variation existed across the group. Sixty five per cent of UK patients reported seeing the doctor or nurse the next day when they last needed care, compared with an average of 67% across the countries (table 5). Twenty four per cent reported waiting six days or more for an appointment, compared with an average of 20% across the countries. UK waiting times were slightly longer for specialist care, with 19% reporting waiting two months or longer, compared with a group average of 12%, but fewer patients reported visiting the emergency department for a condition that could have been treated by a regular doctor (UK, 7%; study average, 9%). The UK had the lowest rates for each category pertaining to unmet need, which included the percentage of adults having any cost related access problem (UK, 7%; study average 15%), skipping a medical test, treatment, or follow-up owing to cost (UK, 3%; study average 8%), and skipping prescribed drugs owing to costs (UK, 2%; study average, 8%). However, the proportion of adults skipping prescribed drugs owing to costs has risen since 2010 in the UK, despite decreasing in other countries.

Table 5

Access to healthcare in UK and comparator countries, 2017 and change from 2010

View this table:

### Quality of care

We examined various aspects of quality of care across the 10 countries, including indicators related to patients’ and providers’ experience and health service outcomes such as mortality and adverse events. The UK population had a similar perception of how well the NHS functions compared with other populations’ views about their healthcare systems. Specifically, 44% of UK adults reported that they thought the healthcare system worked well (compared with the study average of 45%), although this had declined by 19 percentage points since 2010 (table 6). Other national surveys of the UK population, such as the British Attitudes Survey, show a growing consensus among the general population that the NHS faces a major or severe funding problem (86% of respondents in 2017, up from 14% in 2014).13 General practitioners’ views of the health system were not as favourable as in comparator countries, with only 22% of primary care physicians reporting that they thought the healthcare system worked well (compared with the study average of 33%). Moreover, the number of primary care physicians reporting that the system worked well in 2015 had decreased by 24 percentage points from 2012, compared with a mean change of 8 percentage points across all 10 countries (table 6).

Table 6

Quality of care in UK and comparator countries, 2017 and change from 2010

View this table:

A smaller proportion of the UK population reported experiencing a problem with care coordination and a gap in hospital discharge planning than in all other study countries (UK, 19% and 28%, respectively; study averages, 27% and 39%, respectively) (table 6). Although the UK had fewer avoidable admissions to hospitals for diabetes among the adult population (UK, 73; study average, 122; OECD, 138; EU, 135/100 000 population), it had more avoidable admissions for chronic obstructive pulmonary disease (UK, 232; study average, 204; OECD, 194; EU, 194/100 000 population). Thirty day mortality for acute myocardial infarction in the UK was among the highest relative to comparator countries (7.1%; study average, 5.5%), after Germany (7.7%), although it was comparable to the average OECD and EU rates (7.6% and 7.1%, respectively). The UK also had the highest three day mortality for ischaemic stroke (UK, 9.6%; study average, 6.6%; OECD, 8.4%; EU, 8.9%). However, both of these mortality rates declined to a greater extent from 2010 values in the UK compared with the group average.

The UK performed slightly better than the study average for measures of patient safety, including postoperative pulmonary embolism after hip or knee replacement (UK, 316; study average, 330; OECD, 286; EU, 246/100 000 discharges), postoperative deep venous thrombosis (UK, 202; study average, 489; OECD, 347; EU, 351/100 00 discharges), and the prevalence of healthcare associated infections (UK, 5.2%; study average, 6.6%). However, rates were higher for postoperative sepsis after abdominal surgery (UK, 2454; study average, 2058; OECD, 1821; EU, 1949/100 000 discharges) (table 6).

### Population health

Life expectancy at birth in the UK was just below the average of the comparator countries (UK, 81.3 years; study average, 81.7 years) (fig 3). Life expectancy in the UK has been below the average over the past 20 years, although the gap narrowed over the period 2008-13 to a low of 0.3 years (fig 2). Owing to recent increases in mortality in the UK in 2014-15, this gap once again increased, although it seems to be closing again as life expectancy improved in 2016 and 2017. As a result of large improvements in the UK in recent years, smoking rates in 2017 were below average compared with comparator countries, the OECD, and the EU (UK, 16.1%; study average, 16.5%; OECD, 18.4%; EU, 20.1%). The rate of alcohol consumption was about average, and the prevalence of overweight and obesity was above average relative to comparators (alcohol consumption: UK; 9.7; study average, 9.3; OECD, 8.9; EU, 10 L per capita; overweight and obesity: UK, 64%; study average, 54.7%; OECD, 55.1%; EU, 54.6%) (table 7).

Fig 3

Total population life expectancy at birth in UK, average of comparator countries, average of Organization for Economic Cooperation and Development (OECD) member countries, and average of European Union (EU) member countries

Table 7

Population health in UK and comparator countries, 2017 and change from 2010

View this table:

Among the European countries where preventable deaths and treatable deaths are measured, the UK had greater than average rates of preventable deaths compared with the study average (UK, 154; study average, 139 deaths/100 000 population), and the highest rates of amenable deaths (UK, 90; study average, 72 deaths/100 000 population). However, the UK performed similarly to the average of the EU (161 and 93 deaths/100 000 population for preventable and treatable causes, respectively) (table 7). Improvements in each of these measures over the previous five years in the UK was below the average improvement of the group. Maternal mortality in the UK was 7.8 deaths/100 000 live births, which was greater than the mean of the comparators (5.5 deaths/100 000 births) and above the OECD and EU averages (7.0 and 6.4 deaths/100 000 births, respectively); this represents an increase from 2010 values by 0.8 deaths (table 7). The UK had similar rates of infant mortality to other countries (UK, 3.9; study average, 3.8; OECD, 3.7; EU, 3.2 deaths/1000 live births), and they are decreasing at a similar rate to the average (UK, −0.3 deaths; study average, −0.2 deaths). The only countries with higher rates of infant deaths were Canada (4.5 deaths/1000 live births) and the US (5.8 deaths/1000 live births). The UK had the lowest survival rates for breast cancer (UK, 85.6%; study average, 87.4%) and colon cancer (UK, 60%; study average, 64.8%), and the second lowest for rectal cancer (UK, 62.5%; study average, 66.6%) and cervical cancer (UK, 63.8%; study average 66.6%). Prevalence of diabetes was lower in the UK than the average of the group (UK, 4.3%; study average, 6.3%; OECD, 6.5%; EU, 6.1%), but the prevalence of depression and dementia were about average (depression: UK, 2.9%; study average, 2.8%; OECD, 2.6%; EU, 2.6%; dementia: UK; 17; study average, 16.4; OECD, 14.8; EU, 15.8 per 1000 population).

## Discussion

In this study, based on aggregated data from recent years, the UK was consistently the country that spent the least on healthcare per capita compared with nine other high performing health systems. When compared with the 35 member states of the OECD and the 28 member states of the EU, UK healthcare spending was about average. Relative to other countries, the NHS has lower amounts of labour, which have been decreasing at a faster rate, particularly after 2015, when large decreases in the annual inflow of EU trained healthcare professionals have been seen. Despite spending less than comparators, the UK NHS manages to achieve universal population coverage with perceptions of access that were among the highest of all countries examined, while utilisation of care was lower than the average of comparators. However, health service outcomes and measures of population health status are among the lowest in the group and have worsened over the past decade. Taken together, these results suggest that, if the UK NHS wants to achieve comparable health outcomes to other high income countries, or even improve outcomes, it needs to invest more on factors that can reverse the decline of health service outcomes and health status overall. In particular, our study suggests that the NHS should look towards improving staffing ratios, long term care provision, and social spending, which are lower than comparator countries and have been declining in recent years.

### Contribution to previous studies and common narratives on NHS performance

Our findings shed light on some of the most common narratives about the current challenges facing the NHS by taking a comparative perspective to put national numbers into context. A few key findings warrant highlighting. Although the UK has comparable numbers of people over the age of 65, it spends less of its already low total healthcare expenditure on long term care. Furthermore, a much greater proportion of long term care expenditure in the UK comes from private sources than in other healthcare systems. Finally, the UK seems to have much higher rates of informal care than the comparator countries, with high proportions of the workforce reporting that they are out of work or in part time employment because they are providing care.14 In 2017 long term care made up the second largest category of private household spending in the UK, accounting for 36% of out of pocket spending, after spending on medical goods which accounted for 38%.15 In both healthcare and areas of social spending, expenditures coming from the public purse are declining and greater amounts are coming from private sources.

The role of migrants in the NHS has been a considerable focus in recent years, with regards to increasing demand pressures on the NHS from migrants as healthcare users, but also in terms of their role as providers of care. We found that both in absolute magnitude and as a proportion of the population, migrants in the UK make up less of the population than the average of comparator countries. Unless migrants coming to the UK are somehow dramatically sicker than those going to other similar countries, they are unlikely to be putting disproportionately greater pressure on healthcare demand in the UK than elsewhere. When it comes to the healthcare workforce, we found that the UK had among the highest proportion of foreign trained doctors and nurses. Despite this, the numbers of all types of healthcare professionals reported (general practitioners, specialists, and nurses) were some of the lowest of all countries studied, and the numbers are declining. As the migration of healthcare professionals has decreased since 2015, as evidenced by an 87% drop in new nurses coming from the EU to work in the UK from 2016-17 to 2017-18,16 the existing staffing challenges facing the NHS will clearly be further exacerbated. Policy makers should consider how recent changes to nursing bursaries, the weakened pound, and uncertainty about the status of immigrant workers in the light of the Brexit referendum result have influenced these numbers and how to respond to these challenges in the future.

Other aspects of structural capacity in the UK NHS compared with other health systems suggest problems with sustainability of care. The numbers of beds in the UK are at the lower end of the distribution of comparator countries and well below the average of the OECD and the EU. Although pay for doctors has been a major focus in the media, we found that relative to other countries the remuneration of doctors was about average, both in terms of nominal pay and as a ratio to the national wage. Moreover, physicians in the UK were less likely to report being dissatisfied with their incomes than were those in many comparator countries. Pay for nurses in the UK, however, was lower than the average across countries in both nominal and relative terms.

With regards to access to care, we found that the UK had average waiting times for specialist and primary care. Although the total number of consultations and hospital admissions in the UK was slightly below the average, it was not the lowest, despite having some of the lowest staffing levels. UK primary care physicians reported spending less time with their patients than did all other comparators. Ratings of patient experience and population satisfaction were similar to those in other countries, but have declined by a large amount in recent years, and a lower number of general practitioners in the UK than in other countries reported experiencing problems with continuity of care for their patients.

One of the biggest ongoing debates about the NHS has to do with the extent to which services are able to cope with government cuts to long term care funding and sluggish NHS funding. With the exception of patient safety measures, for which the UK performed slightly better than average on most measures, we found that most health service outcomes were below average and, in many cases, were the lowest of the group. Mortality rates for acute myocardial infarction and ischaemic stroke were the second highest and highest respectively. Compared with the wider OECD and EU averages, they were average at best. Cancer survival rates were the lowest of the comparator countries for breast and colon cancer, with cervical and rectal cancer survival being the second lowest. Maternal mortality in the UK was higher than for all comparators except the US and Germany, and is increasing. The numbers of preventable and treatable deaths in the population were the third highest and highest respectively. These findings may represent the difficulty of delivering the full set of services in a constrained setting with fewer providers and beds: the quality of the service may be beginning to suffer.

This analysis extends a body of work that has examined recent funding cuts in the NHS and their effect on performance. Many local reports in the academic literature and the media have noted the effect that funding cuts have had on emergency waiting times, hospital emergency alerts over winter months, and delayed discharge.13 This work shows that relative to other countries, the UK is also lagging behind with regards to many health service outcomes and population health measures, confirming other findings such as the poor comparative cancer outcomes highlighted in recent reports, despite large improvements in recent years.4

### Limitations of study

This study has several limitations. Firstly, the data presented in this paper are purely descriptive; we did no statistical analyses to determine whether the UK’s performance was statistically different from that of the comparator countries. In some cases, differences between countries and over time were small and may have been influenced by the comparability of patients and supply-side factors across countries and over time. Secondly, the data available to provide a true “apples with apples” comparison were limited. To ensure the validity of the data presented, we selected indicators from sources that have well established processes for validating national data with country representatives. Thirdly, our paper presents aggregate data for all of the UK, which does not take into account the large differences that exist in the NHS across the four constituent countries in the UK—namely, England, Scotland, Wales, and Northern Ireland. This was largely to do with the difficulty in finding comparable data across these countries. Finally, our main comparison is with nine other countries, all of which spend more on healthcare than the UK does. Perhaps our relative assessment of the UK would be more favourable had a different set of countries been chosen, representing a group that spends a closer proportion of GDP on their healthcare systems to the UK, such as Portugal, Spain, and Italy. We chose to focus the comparison on a group of countries that we believe the UK tends to liken itself to,717 almost all part of the G12 and very high income. However, to show the sensitivity of the interpretation to the selection of comparator countries, we also show the comparison of UK performance with the average performance of all OECD countries and all EU countries.

### Conclusion and policy implications

We examined 79 health systems metrics in the UK and nine comparable countries and found that the UK had lower spending and slower growth in expenditure than comparators. Several factors contribute to the relatively low expenditure in the UK, including lower levels of doctor and nurse staffing, lower rates of utilisation, and less provision of long term care than comparators. Despite already low levels of labour, the UK is making do with fewer doctors and nurses, a challenge that is likely to be exacerbated in the context of Brexit. Although access to care compared favourably to other countries, utilisation was lower than average and quality seems to be slipping. Health service outcomes, as well as heath status, are suboptimal. This work suggests that although the NHS has done a remarkable job in managing the constrained funding environment, the broader challenges are such that if the UK wants an NHS that remains high performing and a nation with good health outcomes, it will almost certainly need to spend more on healthcare staffing, long term care, and other social services, which lag behind comparators.

#### What is already known on this topic

• The UK National Health Service (NHS) has faced sustained financial pressures while handling increasing demand

• Cuts to social care have coincided with an increase in the population of older people

• The NHS has increased productivity and efficiency in recent years, but it still faces substantial challenges

• The UK spent the least per capita on healthcare in 2017 compared with nine high income comparator countries, and spending was growing at slightly lower levels

• Factors contributing to the relatively low expenditure in the UK include lower levels of staffing, lower rates of utilisation, and less provision of long term care than comparators

• The NHS showed pockets of good performance, including in health service outcomes, but spending, patient safety, and population health were all below average to average at best

## Footnotes

• Contributors: IP led the design of the study, guided the data collection and creation of tables and figures, and drafted the manuscript. EM provided critical guidance on the project to make it as relevant to a UK audience as possible and contributed to the drafting of manuscript. AG contributed to data collection, table and figure creation, and drafting of the manuscript. LW participated in data collection and drafting of the manuscript. AKJ supervised the data collection and drafting of the manuscript. The corresponding author attests that all listed authors meet the criteria for authorship and that no others meeting the criteria have been omitted. All authors have read and approved the final draft. IP is the guarantor.

• Funding: None.

• Competing interests: All authors have completed the ICMJE uniform disclosure form at www.icmje.org/coi_disclosure.pdf (available on request from the corresponding author) and declare: no support from any organisation for the submitted work; no financial relationships with any organisations that might have an interest in the submitted work in the previous three years; no other relationships or activities that could appear to have influenced the submitted work.

• Ethical approval: Not needed, as the study relied solely on secondary, aggregated data and involved no human participants.

• Transparency: The lead author (the manuscript’s guarantor) affirms that this manuscript is an honest, accurate, and transparent account of the study being reported; that no important aspects of the study have been omitted; and that any discrepancies from the study as planned (and, if relevant, registered) have been explained.

• Data sharing: No additional data available.

This is an Open Access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited and the use is non-commercial. See: http://creativecommons.org/licenses/by-nc/4.0/.


text:
# Tag Info

Are you sure it is supposed to be sign function ? According to this https://projects.coin-or.org/ADOL-C/browser/stable/2.1/ADOL-C/doc/adolc-manual.pdf?format=raw in section 1.8, condassign(a,b,c,d) is equal to a = (b > 0) ? c : d So the function posted is actually giving Heaviside function and not the sign function. It implements this function  f(x) =...


text:
RUS  ENG JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB
 General information Latest issue Archive Impact factor Search papers Search references RSS Latest issue Current issues Archive issues What is RSS

 Vestnik Moskov. Univ. Ser. 1. Mat. Mekh.: Year: Volume: Issue: Page: Find

 Vestnik Moskov. Univ. Ser. 1. Mat. Mekh., 2013, Number 3, Pages 29–34 (Mi vmumm404)

Mathematics

Elementary equivalence of automorphism groups of reduced Abelian $p$-groups

M. A. Roizner

Lomonosov Moscow State University, Faculty of Mechanics and Mathematics

Abstract: Unbounded reduced Abelian $p$-groups ($p\geq3$) $A_1$ and $A_2$ are considered. It is proved that if the automorphism groups $\operatorname{Aut}A_1$ and $\operatorname{Aut}A_2$ are elementary equivalent, then the groups $A_1$ and $A_2$ are equivalent in the second order logic bounded with the final rank of the basic subgroups of $A_1$ and $A_2$.

Key words: elementary equivalence, second order equivalence, Abelian $p$-groups, automorphism groups.

Full text: PDF file (246 kB)
References: PDF file   HTML file

English version:
Moscow University Mathematics Bulletin, 2013, 68:3, 156–161

Bibliographic databases:

UDC: 512.541.6 + 510.67

Citation: M. A. Roizner, “Elementary equivalence of automorphism groups of reduced Abelian $p$-groups”, Vestnik Moskov. Univ. Ser. 1. Mat. Mekh., 2013, no. 3, 29–34; Moscow University Mathematics Bulletin, 68:3 (2013), 156–161

Citation in format AMSBIB
\Bibitem{Roi13} \by M.~A.~Roizner \paper Elementary equivalence of automorphism groups of reduced Abelian $p$-groups \jour Vestnik Moskov. Univ. Ser.~1. Mat. Mekh. \yr 2013 \issue 3 \pages 29--34 \mathnet{http://mi.mathnet.ru/vmumm404} \mathscinet{http://www.ams.org/mathscinet-getitem?mr=3185281} \transl \jour Moscow University Mathematics Bulletin \yr 2013 \vol 68 \issue 3 \pages 156--161 \crossref{https://doi.org/10.3103/S0027132213030042}


text:
1. ## precentages

The sales price of a car is $12,590 which is 20% off the original price. What is the original price? 2. Originally Posted by DEPOTHOME The sales price of a car is$12,590 which is 20% off the original price. What is the original price?
thank you

3. Originally Posted by DEPOTHOME
The sales price of a car is $12,590 which is 20% off the original price. What is the original price? Hello, let x be the original price. Then you know:$\displaystyle 0.8 \cdot x = \$12,590$. Solve for x and you'll get:

x = \$ 15,737.50

EB


text:
# Probability of picking a random natural number

I randomly pick a natural number n. Assuming that I would have picked each number with the same probability, what was the probability for me to pick n before I did it?

-
This is more a question for a psychologist than for a mathematician. Humans tend to pick certain numbers more often than other numbers. For example 7, 17, 35 and 37 are quite popular. No amount of mathematics would allow you to predict such a distribution without some facts from psychology. See here for some more details: scienceblogs.com/cognitivedaily/2007/02/… – Dan Piponi Jan 18 '11 at 23:06

There is no uniform distribution on the natural numbers. So the question itself is self-contradictory.

Some explanation:

You say that each number is chosen with the same probability. Say probability $c$. Let's denote the probability to choose $n$ by $p(n)$. So you say $p(n)=c$ for any natural $n$. For any distribution, the sum of probabilities always equals 1: $$p(1)+p(2)+p(3)+ \dots = 1.$$ So $c+c+c+\dots = 1.$ But if $c > 0$, you get $$c+c+c+\dots = \infty.$$ And if $c=0$ you get $$c+c+c+\dots = 0.$$ There's no value of $c$ for which this sum equals $1$.

-
So, are you saying that whenever I pick a natural number at random, some are more likely to get picked by me than others? – Thomas Dec 13 '10 at 11:20
Yes. Here's an example: Choose n with probability $1/(2^{n})$. This is a valid distribution because $1/2 + 1/4 + 1/8 + ... = 1$. – user3533 Dec 13 '10 at 11:22
If this seems counterintuitive, think of a person choosing a "random natural number". Any normal person would choose a number with much less than a billion digits (I'm exaggerating on purpose), so he's actually choosing from a finite set of naturals, giving all larger ones 0 probability. – user3533 Dec 13 '10 at 11:27
@Thomas: Not "whenever I pick a natural number at random", but "in general, when I pick a natural number at random". – Shai Covo Dec 13 '10 at 11:48
The point is that it's not possible to pick a natural number uniformly at random. Not that some are more likely than other, this depends on the distribution used. The point is that there is no uniform distribution. – Benjamin Dec 3 '15 at 18:44

There's an aspect that doesn't seem to have been mentioned in the other answers yet.

The question presupposes that it is possible to pick each natural number with the same probability. Since this is not possible, it raises the question what may have led to the assumption that it should be possible. It's instructive to compare this with typical cases where there is a uniform distribution.

When we roll a die, there's a symmetry between the sides. There's no reason why any of them should be more or less likely than the others to come up, so it's clear that the probability for each of them should be the same (if the die is symmetric and we throw it hard enough).

If we spin a wheel, there's again a symmetry among the angles at which it might come to rest. There's again no reason why any of them should be more or less likely than the others, and it's clear that the probability should be uniform across the range of angles (if the wheel is symmetric and we turn it hard enough).

The idea that "I randomly pick a natural number n. Assuming that I would have picked each number with the same probability" seems to be modeled on such cases. So it's instructive to realize that there is no similar experiment that this corresponds to. As has been pointed out in some of the comments, asking a person for a "random" answer won't do, because there's no reason to except symmetry between small and large numbers. Another idea might be to mark the rational numbers on the wheel, choose some bijection mapping them to the natural numbers, and then choose the natural number that corresponds to the rational number at which the wheel comes to rest. But if you think about it, this doesn't make the sense that it does for real numbers.

So there's a direct correspondence between the impossibility of setting up a situation in which there is the required symmetry between all natural numbers and the impossibility of defining a uniform distribution on the natural numbers (or any countably infinite set).

-

If you want to choose a natural number from the set $\lbrace 1,2,3,\ldots \rbrace$ of all natural numbers, then user3533 is right. But if you pick a natural number from a finite set, say $A = \lbrace 1,2,\ldots,N \rbrace$, each number with the same probability, then this probability must be the reciprocal of the number of elements in that set. So, if $A = \lbrace 1,2,\ldots,N \rbrace$, then $p=1/N$. This follows immediately from $\sum\nolimits_{i = 1}^N {p_i } = 1$ with $p_1 = p_2 = \cdots = p_N = p$.

-

It would require a definition of a probability distribution with an infinitesimal probability mass at every natural number. Dirac delta functions of infinitesimal length.

In (Bayesian) statistics, functions that relax the axiom of "summation to one" are known as improper priors and have an infinite total mass. This loss of the axiom on tautology ($p(T)=1$ for any tautology $T$) comes with severe repercussions. You'll see Dutch book arguments that make this clear.

Note that there are many infinite sequences that people try to tackle with tools from probability theory. Most famous are the attempts to postulate hypotheses about the distribution of subsequent primes. So, this means that questions like the one you have are very good to ask ourselves.

There is also the concept of natural density. The natural density of picking an even natural number is $1/2$.

-


text:
filtering pindel results
1
2
Entering edit mode
6.0 years ago
Tootiki ▴ 40

I have BAMs from which I am trying to detect reliable variants, to find differences between two strains of Aspergillus. I have used HaplotypeCaller to call call SNPs and small InDels, and Pindel to call longer InDels and other structural variants. I understand that filtering is always a balancing act and there may be no objectively best answer to this question, but any advice or experience anyone has would be appreciated. Also, feel free to criticise any of the background I give you!

Cobbling together ideas from here and there, I have used the following filters on my HaplotypeCaller results (incidentally, do you like them?):

for SNPs:

--filterExpression " QD            <     2.0 " --filterName "LowQD"
--filterExpression " FS            >    60.0 " --filterName "HighFS"
--filterExpression " SOR           >     4.0 " --filterName "HighSOR"
--filterExpression " MQ            <    40.0 " --filterName "LowMQ"
--filterExpression " DP            <    10   " --filterName "LowDP"
--filterExpression "MQRankSum      <   -12.5 " --filterName "LowMQRankSum"
--filterExpression "ReadPosRankSum <    -8.0 " --filterName "LowReadPosRankSum"

for short InDels:

--filterExpression " QD            <    2.0 " --filterName  "LowQD"
--filterExpression " FS            >  200.0 " --filterName  "HighFS"
--filterExpression " SOR           >   10.0 " --filterName  "HighSOR"
--filterExpression " DP            <   10   " --filterName "LowDP"
--filterExpression "ReadPosRankSum <  -20.0 " --filterName  "LowReadPosRankSum"

This reduces the number of short variants I’m dealing with from an already modest 2,065 to 1,965 (in one example sample).

However, I also care about larger variants, so I ran Pindel on the same BAMs. I used pretty much default parameters, and have not yet attempted to filter. I get a whopping 37,856 variants to deal with (admittedly this is across my two samples, so not totally comparable to my above figures, but we are clearly not in the same ball park). These are:

27410   Deletions
6821   Short insertions
1730   Inversions (INV)
1312   deletions with non-template sequences
583   Tandem duplications
0   Tandem duplications with non-template sequence (TD_NT)
0   Inversions with non-template sequence (INV_NT)

I guess to be meaningful and usable along side my short variants, they need some amount of filtering, but exactly how should I go about this, particularly with the range of different types of variant?

I've had a bit of a google and found several half-answers:

There seems to be talk online of just filtering by DP and sample number (eg https://www.biostars.org/p/70476/). How safe is that? I guess it still leaves me prone to many kinds of error, such as any that are introduced by mapping errors. Also I have just two samples...

I've had a quick look at AgilePindelFilter, which looks cool if you have more biological knowledge than I do. I'll let the biologists know about this when I pass back the work, but I’d like to reduce the numbers for them a bit before then, to make it something like equivalent to the HaplotypeCaller results.

There are also a couple of scripts available, without much documentation: Filter_Pindel_del_vcf.py, to filter out deletions (and insertions?) with a variant quality of <30; and Filter_Pindel_inv_vcf.py, to filter out inversions that are less than 100 bp (why do we want to do that?) and (/or?) with a variant quality of <30. do these look like good parameters? Also, what about the other variant types that Pindel reports (e.g. tandem duplication)?

Thanks very much.

pindel indel filtering calling rearrangement • 2.4k views
ADD COMMENT
0
Entering edit mode
5.9 years ago
Tootiki ▴ 40

if anyone else is looking for the answer, i have it!

firstly, to be clear, i'm always talking about the vcf file made by pindel2vcf from my initial pindel results file.

this contains many sites that pindel doesn't predict as alt in any whole samples.
i think that any site that is predicted as alt in any single read ends up in the vcf, which seems a little useless and inconvenient to me, but i guess in other circumstances it must be desirable. so the vast majority of the reported sites listed actually turned out to be 0/0 in both samples. before i noticed this, I had assumed that i only had sites that were actually being called as alt in at least one whole sample.

once i filtered these out i had a much more manageable number of sites, and i was able to live out my days peacefully.

i did this using:

grep "$$0\/1\|1\/1\|1\/0\|#$$" .........../results.vcf >  ........../results.just_sites_called_in_samples.vcf

ADD COMMENT
0
Entering edit mode

Hi,

Actually, I don't get it. In my pindel output file, I also got numerous entries. If I try your way, then I got 16,824 entries out of 1,44,563. Definitely, it is very less as compared to original one. But there are many 0/0 which are either INS or DEL, then how can I remove them. What will you suggest. Is there any other way around. Thanks.

ADD REPLY

Login before adding your answer.

Traffic: 798 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6


text:
# potfit wiki

open source force-matching

### Sidebar

User Guide

Examples

Potential Databases

More

examples:potentials:pair:5

# Examples : Pair Potentials

Warning: This is an example potential. Please do NOT use it for any real simulations!

This is a simple pair potential that can be used in potfit. The analytic function used is a Lennard-Jones.

It makes use of the fixing parameters feature.

Example_Pair_5
#F 0 3
#T PAIR
#I 0 0 0
#E

type lj
cutoff 6.0
# The following parameter is fixed
epsilon 0.10    0.00    0.00
sigma   2.50    1.00    4.00

type lj
cutoff 6.0
# The following parameter is fixed
epsilon 0.10    0.10    0.10
sigma   2.50    1.00    4.00

type lj
cutoff 6.0
# The following parameter is fixed
epsilon 0.10    1.00    1.00
sigma   2.50    1.00    4.00

The optimization of single parameters can be disabled with this feature. The parameter will be removed from the optimization table and remain at its initial value. For all three lj-potentials in the above example the epsilon parameter will not be optimized, it will always have the fixed value of 0.1. To fix a parameter, the lower and upper bound have to be equal.

### makeapot

The example potential can be generated with the following makeapot command:

Hint: The parameters have to be fixed manually in the potential file!

makeapot -n 2 -i pair -f 3*lj


text:
## Monday, November 9, 2015

### Find $k$ if $k\sin 6x=\sin 2x$ given $6\cos 6x=\cos 2x$.

Find $k$ if $k\sin 6x=\sin 2x$ given $\dfrac{\cos 6x}{\cos 2x}=\dfrac{1}{6}$.

There are at least three different methods of solving for this particular problem. One is rather straightforward, and the other two methods are quite special.

We will discuss each of them separately, let's first talk about the straightforward method:

Note that we have, from the triple angle formula for sine and cosine function that [MATH]\color{yellow}\bbox[5px,purple]{\sin 3x=3\sin x-4\sin^3 x}[/MATH] and [MATH]\color{yellow}\bbox[5px,green]{\cos 3x=4\cos^3 x-3\cos x}[/MATH]:

$k\sin 6x=\sin 2x$

\begin{align*}k&=\dfrac{\sin 2x}{\sin 6x}\\&=\dfrac{\sin 2x}{3\sin 2x-4\sin^3 2x}\\&=\dfrac{\sin 2x}{\sin 2x(3-4\sin^2 2x)}\\&=\dfrac{1}{3-4(1-\cos^2 2x)}\\&=\dfrac{1}{-1+4\cos^2 2x}\\&=\dfrac{1}{4\cos^2 2x-1}\end{align*}

Thus, if we have found the value for $\cos 2x$, then our mission is accomplished.

$6\cos 6x=\cos 2x$

$6(4\cos^3 2x-3\cos 2x)=\cos 2x$

$6\cos 2x(4\cos^2 2x-3)=\cos 2x$

$\cos 2x(6(4\cos^2 2x-3)-1)=0$

$\cos 2x(24\cos^2 2x-19)=0$

Therefore, we have either

$\cos 2x=0$ or

$24\cos^2 2x-19=0$ which implies $\cos 2x=\pm\sqrt{\dfrac{19}{24}}$.

Therefore, taking $\cos 2x=0$ we get:

\begin{align*}k&=\dfrac{1}{4\cos^2 2x-1}\\&=-1\end{align*}

Hey, we can't take $\cos 2x=0$ because $\cos 2x$ is in the denominator, and a zero denominator will make the entire equation undefined.

So, when taking $\cos 2x=\pm\sqrt{\dfrac{19}{24}}$, it gives us the only solution for this problem, which is:

\begin{align*}k&=\dfrac{1}{4\left(\dfrac{19}{24}\right)-1}\\&=\dfrac{6}{13}\end{align*}


text:
Free Version
Difficult

# Secant (Alpha Plus Beta)

TRIG-WCTEMF

If angle $\alpha$ has a tangent of $\cfrac{{12}}{5}$, and lies in Quadrant III, and angle $\beta$ has a secant of $\cfrac{8}{3}$ and lies in Quadrant IV, determine $\sec{(\alpha+\beta)}$.

A

$\cfrac{520-416\sqrt{55}}{2565}$

B

$\cfrac{346\sqrt{55}-13}{2565}$

C

$\cfrac{-15-12\sqrt{55}}{104}$

D

$\cfrac{-15-12\sqrt{55}}{-104}$

E

$-\cfrac{1}{104}$


text:
## Intermediate Algebra (6th Edition)

We are given that $2(x+3)\gt2x+1$ We can solve for x by using the distributive property to simplify the left side. $2x+6\gt2x+1$ Subtract 1 from both sides. $2x+5\gt2x$ Subtract 2x from both sides. $5\gt0$ This is true for all values of x, so the inequality is satisfied for all real numbers.


text:
# Template:Libgober&Wood1981

Jump to: navigation, search

A. S. Libgober and J. W. Wood, On the topological structure of even-dimensional complete intersections, Trans. Amer. Math. Soc. 267 (1981), no.2, 637–660. MR626495 (83e:57017) Zbl 0475.57013


text:
# Project Euler 108: Solving the Diophantine equation 1/x + 1/y = 1/n.

Let us jump right into Problem 108 of Project Euler which reads

In the following equation xy, and n are positive integers.

$\displaystyle\frac{1}{x}+\frac{1}{y} =\frac{1}{n}$

For n = 4 there are exactly three distinct solutions:

$\displaystyle\frac{1}{5}+\frac{1}{20} =\frac{1}{n}$

$\displaystyle\frac{1}{6}+\frac{1}{12} =\frac{1}{n}$

$\displaystyle\frac{1}{8}+\frac{1}{8} =\frac{1}{n}$

What is the least value of n for which the number of distinct solutions exceeds one-thousand?

NOTE: This problem is an easier version of problem 110; it is strongly advised that you solve this one first.

We could possibly brute force, but my guess is that it would take a rather long time to do so. So instead I started fiddling around with the equation to get some insight into the problem.

Starting with the original

$\displaystyle\frac{1}{x}+\frac{1}{y} =\frac{1}{n}$

we can see that both x and y needs to be greater than n since they both need to be non-negative. This means that we can express the equation as

$\displaystyle\frac{1}{n+r}+\frac{1}{n+s} =\frac{1}{n}$

where $r,s \in \mathbb{N}$, meaning that they are integers strictly larger than zero.

Putting this on a common denominator gives us

$\displaystyle\frac{n+s+n+r}{(n+r)(n+s)} =\frac{1}{n} \Leftrightarrow$

$\displaystyle n(n+s+n+r) =(n+r)(n+s) \Leftrightarrow$

$\displaystyle n(n+s+n+r) =n^2 + nr + ns + sr \Leftrightarrow$

$\displaystyle n^2 = sr \Leftrightarrow$

So both s and r are divisors of n^2, which also means that all divisor pairs of $n^2$ will give us a solution to the problem. However, only half of the divisor pairs will give a unique solution since you can simply swap r and s and get a solution as well.

So if d(n) is a function giving us the number of divisors of n, we are looking for the first n such that d(n^2) / 2 > 1000.  All numbers have an even number of divisors unless $\sqrt{n}$ is a divisor of n. In that case the number will have an odd number of divisors. I wont prove this, but I will leave it for you to figure out. In our case we have $\sqrt{n^2} = n$ which is also a divisor, therefore we are looking for a solution to which have (d(n^2) + 1) / 2 > 1000, where the division is an integer division.

## Finding divisors

The huge task in this exercise is to actually find the smallest number with many divisors. In Problem 12 we were asked to find the number of divisors of a number. Where we established that we could use the prime factorization to find the number of divisors such that if we have the number N we have

$\displaystyle N = p_1^{a_1} \cdot p_2^{a_2} \cdot p_3^{a_3} \dots = \prod_{n=1}^K p_n^{a_n}$

and then the number of divisors will be

$\displaystyle d(N) =(a_1+1) \cdot (a_2 +1) \cdot (a_3+1)\dots= \prod_{n=1}^K (a_n+1)$

However, we can cheat a bit so instead of factoring $n^2$ we will factor $n$ and the number of factors of  $n^2$ will then be

$\displaystyle d(N) =(2a_1+1) \cdot (2a_2 +1) \cdot (2a_3+1)\dots= \prod_{n=1}^K (2a_n+1)$

since we have that

$\displaystyle N^2 =( p_1^{a_1} \cdot p_2^{a_2} \cdot p_3^{a_3}\dots)^2 = (\prod_{n=1}^K p_n^{a_n})^2 =\prod_{n=1}^K p_n^{2a_n}$

This will help us significantly since it is much easier to factor a smaller number.

The algorithm I use for prime factorization requires a list of prime numbers, so I started probing around to figure out what I needed. I found that (2357111317)^2 has 2187 divisors, which is more than the 1999 we need in order to solve the problem, so we can set the upperlimit of the prime list to 17, and if a number have a prime factor larger than 17, that is not the number we are looking for anyway.

## Coding the solution

I have changed the divisor counting function as described above, which resulted in  the C# code

private long NoDSquared(long number, long[] primelist) {
long nod = 1;
long exponent;
long remain = number;

for (int i = 0; i < primelist.Length; i++) {
// In case there is a remainder this is a prime factor as well
// The exponent of that factor is 1
if (primelist[i] * primelist[i] > number) {
return nod * 2;
}

exponent = 1;
while (remain % primelist[i] == 0) {
exponent+=2;
remain = remain / primelist[i];
}
nod *= exponent;

//If there is no remainder, return the count
if (remain == 1) {
return nod;
}
}
return nod;
}

and then the main loop for the code is

long n = 1;
long result = 0;
long limit = 1000;

while (true) {
if ((NoDSquared(n, primes) + 1) / 2 > limit) {
result = n;
break;
}
n++;
}

Nothing more to say than we should run the code which on my computer gives me the result

The first n with more than 1000 solutions is 180180

and the time

Solution took 31,0487 ms

## Wrapping up

While this most certainly solved problem 108 within the time limit, it is far from fast enough for Problem 110, so we will be revisiting this problem soon enough.

You can find the complete source code here as always.

### Posted by Kristian

Eman

Hello, nice solution I solved this on the third or fourth try. I used this approach: I found the the number we are looking for must be very composite (lot of factors) so I made some test, some tries and finally found solution.

P.S this is very stupid factorization metod but it was from my beginings

#include
#include
#include

using namespace std;

const int MAX_SOLUTIONS = 1000;
typedef unsigned long long Long;
int getSolutions(Long n);

int main()
{

time_t start = clock();

int solutions = 0;
Long n=2*3*5*7*11*13;
Long x = 2*3*5*7*11*13;

while(solutions <= MAX_SOLUTIONS)
{

solutions = getSolutions(n);
//cout<<n<<'\t'<<solutions<<endl;
//cin.get();
n+=x;
}

cout<< "Project Euler 108:\t"<<n - x<<"\t"<<solutions<<endl;
cou<<"PROGRAM LAST:\t"<<(clock() - start)"<< ms."<<endl;

}

int getSolutions(Long  n)
{

Long maxX = 2*n;
register int solutions=0;
Long differ;
long double y;
Long x;

for(x = n+1; x<=maxX; x++)
{
differ = x-n;

y = (x*n)/(long double)differ;
//if(y < x)
// return solutions;
if((Long)y == y)
{
solutions++;
// cout<<x<<"\t"<<y<<"\t"<<differ<<endl;

}

}

return solutions;

}

robert

Your pages show very well with the MathML. I wonder whether you ca let me know what sort of software that you are using to get the Math symbols right. Thanks.

Kristian

Hi Robert

I use wordpress as you probably have figured out and to render the math I use the optimized latex plugin

Ralf

How would you solve Diophantine equation a*c1+b*c2+c*c3+d*c4+…+i*c9=n?

Manas Srivastava

Consider the equation: 1/x + 1/y= 1/6
Acc. to you,

6=2^1 * 3^1
So, No. of distinct possible are= (1+1) * (1+1)
= 4

But following solution are possible: (7,42) (8,24) (9,18) (10,15) (12,12)
These are 5 solutions.
Please clear my doubt and correct me where I am wrong.

Individ
QuasiChameleon

@Manas Srivastava

According to Kristian, the number of distinct possibilities is floor((d(n^2) + 1) / 2), which for 6 becomes floor([(2*a2 + 1)*(2*a3 + 1) + 1]/2) = 5.

Note that a2 and a3 are both 1.

BartV

2187 is simply 3^7 , the number of divisors of any number that’s a product of 7 different prime factors, following the formula you quoted.

I think you were well on the way to solving this problem without any code whatsoever.

2*3*5*7*11*13*17 > 2^4 *3*5*7*11*13*17 > 2^2 * 3^2 * 5*7*11*13*17
3^7 == 3^5 * (2*4+1) > 3^4 * (2*2+1) * (2*2+1) > 1999

_tr_#

when i find analysis’s Kristan i try it in hackkerank but i only earn 50 d 🙂 , i used miller rabin but still wrong with testcacse
5,7,8,9,11.
https://www.hackerrank.com/contests/projecteuler/challenges/euler108/problem?h_r=profile
I think this analysis’s Kristan “n^2=rs ” have relate to analysis’s pytagor
r
s=[(r+s)/2]^2 – [(r-s)/2]^2=n^2
-> (2*n)^2+(r-s)^2=(r+s)^2 , and i do not know it help everything lighting up ?


text:
Physical Review Letters ( IF 8.385 ) Pub Date :
A. N. Petsch; M. Zhu; Mechthild Enderle; Z. Q. Mao; Y. Maeno; I. I. Mazin; S. M. Hayden

Recent observations [A.~Pustogow .~Nature 574, 72 (2019)] of a drop of the ${}^{17}$O nuclear magnetic resonance (NMR) Knight shift in the superconducting state of Sr${}_{2}$RuO${}_{4}$ challenged the popular picture of a chiral odd-parity paired state in this compound. Here we use polarized neutron scattering (PNS) to show that there is a $34±6$,% drop in the magnetic susceptibility at the Ru site below the superconducting transition temperature. We measure at lower fields $H\sim \frac{1}{3}{H}_{c2}$ than a previous PNS study allowing the suppression to be observed. The PNS measurements show a smaller susceptibility suppression than NMR measurements performed at similar field and temperature. Our results rule out the chiral odd-parity $𝐝=\stackrel{̂}{𝐳}\left({k}_{x}±i{k}_{y}\right)$ state and are consistent with several recent proposals for the order parameter including even-parity ${B}_{1g}$ and odd-parity helical states.

down
wechat
bug


text:
# Find U dot V

• February 25th 2014, 06:27 AM
IStandAlone99
Find U dot V
Find U ● V, angle between them is 55°, |u| = 6, |v|=4. I was wondering how to set this up, thanks.
• February 25th 2014, 06:41 AM
HallsofIvy
Re: Find U dot V
One fairly standard definition of the dot product of u and v is $|u||v| cos(\theta)$ where $\theta$ is the angle between the vectors. Have you not seen that before?
• February 25th 2014, 06:44 AM
IStandAlone99
Re: Find U dot V
I have not.
• February 25th 2014, 12:15 PM
sakonpure6
Re: Find U dot V
The dot vector http://www.mathsisfun.com/algebra/ve...t-product.html
This is the geometric dot vector because the definition has cos theta in it: $a \cdot b = |b| |a| cos \theta$
This is the algebraic dot vector, Let vector a=(x,y,z) b = (m,n,o) : $a \cdot b = (x,y,z) (m,n,o) \\= x*m + y*n + z*o$
Also you should note that the dot vector of any two vectors produces a SCALAR.

So provided the information and equation, can you solve the problem you have?
• February 25th 2014, 03:47 PM
Prove It
Re: Find U dot V
Quote:

Originally Posted by sakonpure6
The dot vector Dot Product
This is the geometric dot vector because the definition has cos theta in it: $a \cdot b = |b| |a| cos \theta$
This is the algebraic dot vector, Let vector a=(x,y,z) b = (m,n,o) : $a \cdot b = (x,y,z) (m,n,o) \\= x*m + y*n + z*o$
Also you should note that the dot vector of any two vectors produces a SCALAR.

So provided the information and equation, can you solve the problem you have?

It is NOT the dot vector. It is either called the DOT PRODUCT or the SCALAR PRODUCT. The result is a scalar, not a vector, and the vector product is different. Please use the correct terminology to avoid confusing the OP.
• February 25th 2014, 04:55 PM
sakonpure6
Re: Find U dot V
Thanks for noticing that, I meant "dot product".


text: Place large amount of plant materials in a large round bottomed flask (no more than half full), and just cover with water. Always use a Claisen adapter, as there is often turbulence in the flask. Two variations are common: Heat the water with a Bunsen burner to create steam directly. Add steam indirectly through a steam line from the building. Collect the distillate at a rate of 1 drop per second. The distillate may appear cloudy, or a second layer may form on the top. If milky, the distillation can be ceased when the distillate is clear. If a steam line was used, be sure to drain the liquid from the steam trap before turning off the steam, to prevent back suction. Separated oil can be pipetted (then dried with $$\ce{Na_2SO_4}$$), while milky distillates need to be extracted.


text:
## WeBWorK Main Forum

### Library browser causes slow-down

by Lars Jensen -
Number of replies: 16
Hi everyone,

It seems that working in the library browser for extended periods of time causes the library browser to slow down. Initially, as I build a set, the browser refreshes quickly as I change between libraries and add problems to a set. But after having added problems from several locations and refreshed several times, the library browser begins to slow down dramatically, and eventually becomes very slow, taking several minutes to refresh a small page.

What causes this behavior, and is there any remedy?

Thanks,
Lars.

### Re: Library browser causes slow-down

by D. Brian Walton -
I just wanted to say that my school has been suspicious of this behavior for a few months, but we have not been able to validate the hypothesis yet. If we are seeing the same behavior, then the entire server slows down and not just the library browser. We see extended response times for all users of the server at those times, and it does not necessarily match when many students are active.

In fact, last summer we had only instructors working and saw the slowdowns. At the time we thought it was just a server issue and mostly resolved the problem by adjusting the number of available threads and increasing the amount of memory assigned to the virtual server.

This was going to be one of my summer activities, trying to replicate the issue and pin down the problem.

D. Brian Walton
In reply to D. Brian Walton

### Re: Library browser causes slow-down

by Arnold Pizer -
Hi,

When investigating this, it would be good to report the OS name and version, the version of Perl and especially the version of MySQL you are using.

Thanks,

Arnie

### Re: Library browser causes slow-down

by Lars Jensen -
Hi Arnold,

Our version numbers are:

Ubuntu 10.04.3 LTS (lucid)
Perl v. 5.10.1
Mysql Ver 14.14 Distrib 5.1.41

Lars.

### Re: Library browser causes slow-down

by Alexander Basyrov -
My two cents.

Our installation:
Debian Linux 6 (squeeze)
perl v5.10.1
mysql Ver 14.14 Distrib 5.1.61

On the installation that we use at UW-Stout, any display of problems through Library Browser causes apache process to increase in its size (e.g., RAM use). The more problems are displayed on one screen, the larger the increase in the size of the apache process.

If one views about 20 problems, the process size grows from about 65m to 110m (I am talking about 'resident' size, 'virtual' size is obviously larger).

If about 50 problems are viewed through the Library Browser, the process size grows to about 206m.

We had the situation when an instructor attempted to view about 500 problems at once, which made apache process to grow beyond 2g limit, so it was killed by kernel and generated a 'segfault' complaint from the kernel.

My first guess would be that repeated use of Library Browser causes a lot of apache processes to become really large, which consumes all of available RAM on the server; the server starts to use swap, and the intensive use of swap slows the server down.

We are using Apache::SizeLimit to terminate any 'huge' apache processes to avoid this type of situation.

Depending on the apache server configuration, it might be quite easy to replicate the problem: one would repeatedly view problems through Library Browser until most of apache processes consume all of available RAM.

### Re: Library browser causes slow-down

by Michael Gage -
Thanks, Alex.  That makes some sense.  Have you or someone else had a chance to try this with the new Library Browser 3? (in the trunk version of webwork now)  I'm curious whether that also causes the child process to increase in size.
(I'm pretty sure that LibraryBrowser2 will still have the same bloating problem, but LibraryBrowser3 uses a different mechanism.)

We haven't observed this bloating systematically here, but we also restart the server every 24 hours just in case some process has grown large.

-- Mike

### Re: Library browser causes slow-down

by Alexander Basyrov -
Mike,

Yes, we also restart apache server every 24 hours -- just in case.

I did not have a chance to work with Library Browser 3, as we did not update webwork code for a while. If and when I have a chance to play with the new Browser, I'll try to report back on the memory usage.

-- Alex

### Re: Library browser causes slow-down

by Lars Jensen -
Hi Mike,

We're running the svn trunk version, but I only see Library browser and Library Browser 2 not Library Browser 3. How do I access Library browser 3?

Thanks,
Lars.

### Re: Library browser causes slow-down

by Michael Gage -
You can get library browser 3 from the github.com/openwebwork repository.
I have this version working on test.webwork.maa.org but you will need to do a bit of work on the configuration files when you install it, so plan to spend a little time, and don't risk it on a machine where being down for a few hours would be a disaster.

For instructions of using svn with github go to

the instructions are pretty straightforward.

There is a README in the webwork2/conf directory for working with the new configuration files.

It's best to get new versions of both the webwork2 repository and the pg repository from github.com/openwebwork.

Complete docs still need to be written which is part of why the newest version hasn't been pushed to the svn repository yet. (Exam season is the other reason :-) )

--Mike

### Re: Library browser causes slow-down

by Jason Aubrey -
Hi Alex,

Could you post your apache config stanzas for Apache::SizeLimit. I think this is a good safeguard and others might like to implement it. In fact, maybe we should make it part of the standard installation instructions...

Thanks,
Jason

### Re: Library browser causes slow-down

by Lars Jensen -
Hi Alex and Jason,

When trying to install Apache2::SizeLimit (ver. 0.96) from CPAN, I get an error - something like "can't find apache include dir." Anyone knows how to fix this?

Lars.

### Re: Library browser causes slow-down

by Jason Aubrey -
Hi Lars,

Looking at the installation documentation in the tar file for Apache2::SizeLimit, it looks like you have to pass it some info about apache:

$tar zxvf Apache-SizeLimit-0.XX.tar.gz$ cd Apache-SizeLimit-0.XX

$perl Makefile.PL For static mod_perl use -httpd /path/to/httpd For dynamic mod_perl use -apxs /path/to/apxs$ make
$sudo make install I don't know how to do that in cpan (it's probably easy), so I'd just suggest downloading the tarball and doing the steps above. Hope this helps, Jason In reply to Jason Aubrey ### Re: Library browser causes slow-down by Danny Glin - My experience is that if apxs is installed and is in the path, then the installers can usually find it. In the Redhat world, this means installing the httpd-devel package. I assume that there's an analogous apache libraries/development package for Ubuntu. Danny In reply to Jason Aubrey ### Re: Library browser causes slow-down by Alexander Basyrov - I did not have to separately install Apache2::Size limit, it seemed to be already available as part of mod_perl installation. Anyways, the following are the edits that I did to webwork.apache2-config file: after the line with my$webwork_dir = "whatever"
# size limiter for Apache2
use Apache2::SizeLimit;

then somewhere close to the end of the <Perl> section (I have it just above the </Perl> line), insert the actual configuration:

# sizes are in KB
$Apache2::SizeLimit::MAX_PROCESS_SIZE = 120000;$Apache2::SizeLimit::MAX_UNSHARED_SIZE = 120000;
\$Apache2::SizeLimit::CHECK_EVERY_N_REQUESTS = 20;
</Perl>

The maximum's are really what one needs to carefully check. Those are the 'virtual' process sizes, on the 64 bit installation they might be 4 times the real resident size.

Then, in the /etc/apache/apache2.conf file I added
PerlCleanupHandler Apache2::SizeLimit
to turn the use of Apache2::SizeLimit on.

### Re: Library browser causes slow-down

by Lars Jensen -
Hi Alex,

Thanks! The SizeLimit module was indeed already on my system - it is in /usr/lib/perl5/Apache2/SizeLimit.pm so that was probably why I couldn't install it. I configured it according to your specifications, and restarted apache without errors.

Lars.

### Re: Library browser causes slow-down

by Alexander Basyrov -
Hi Lars,

Great!

To see if the configuration really does what it is supposed to do, one can look through the error logs of apache for lines similar to

[Wed Apr 11 14:15:21 2012] (19620) Apache2::SizeLimit httpd process too big, exiting at SIZE=315752/120000 KB SHARE=5856/0 KB UNSHARED=309896/120000 KB REQUESTS=61 LIFETIME=5166 seconds
If one is really curious, it should be possible to track the pages (through the access logs) that such killed processes had generated to see if there is a pattern.

There is also a program called monit, http://mmonit.com/monit/ that could be set up to monitor server resources in almost real time. It could be set up to send an email when available RAM get below certain percentage, etc. This could be a way to get more information about what is happening with your webwork server.

-- Alex