• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

Tag Archives: position

How to mark leaves of polynomial based on its position in tree

June 23, 2018   BI News and Info

I’ve been struggling with this for a few days, and so I thought I might ask this here. Part of the problem lies in the fact that I do not even know the mathematical solution, which runs the risk of this question falling out of the scope of this site. Nevertheless, I’ll proceed:

Consider this unexpanded polynomial of Symbols constructed out of heads Plus and Times only:

poly = ((a + b) (c + d (e + f)) + (g + h) i) j + k

What I’d like to do: Without expanding the polynomial, mark the leaves of the polynomial by integers based on its position in the tree. This labeling of leaves must have the property such that

  1. When Expanded, each factor in each term is given a unique label
  2. No more labels are used than necessary for the whole polynomial (number of distinct labels equals overall order of polynomial in all its variables).

For poly, a solution is

((a[1] + b[1]) (c[2] + d[2] (e[3] + f[3])) + (g[2] + h[2]) i[1]) j[0] + k[0]

The result is not unique, but observe that the expanded form satisfies both requirements 1 and 2.

a[1] c[2] j[0] + b[1] c[2] j[0] + a[1] d[2] e[3] j[0] + 
  b[1] d[2] e[3] j[0] + a[1] d[2] f[3] j[0] + b[1] d[2] f[3] j[0] + 
  g[2] i[1] j[0] + h[2] i[1] j[0] + k[0]

It is not necessary that terms with fewer factors use specific labels in any order: for example a labeling of the polynomial in which the 2nd last term of the expanded form is h[1] i[3] j[0] (missing label 2) or in which the last term is k[2] is acceptable.

Moreover I’d like a solution that is faster than just expanding the polynomial and labeling each term.


My original attempt was based on traversing the tree,

WH5eL How to mark leaves of polynomial based on its position in tree

and raising/lowering the value of the label based on whether it passes through Plus or Times. Unfortunately, none of my solutions based on this give the correct answer.

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Read More

Finding position of the maximum value of each subset

January 26, 2018   BI News and Info
 Finding position of the maximum value of each subset

I have the following set:

list = {{32/39, 1/5, 0, 0, 0}, {5/33, 3/5, 1/3, 0, 3/4}};

I need to find the position of maximum value from each subset.
I tried

Position[list, Max[list]]

and it gives the position {{1,1}}. But my result should be {{1,1}, {2,5}}/

2 Answers

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Read More

How to read raw mouse data in v.7 (time-tagged relative position at highest rate and resolution)?

August 5, 2017   BI News and Info
 How to read raw mouse data in v.7 (time tagged relative position at highest rate and resolution)?

I would like to use the innards of an optical mouse (Microsoft BlueTrack) to sense the surface velocity of an arbitrarily-rotating sphere by feeding the x and y relative position changes (along with accurate sample times) directly into Mathematica 7.

The v.7 MousePosition function is confined to the cell/window/screen coordinates and does not seem to allow for unbounded motion, or the removal of any mouse driver filtering.

I probably need to use the Windows user32.dll functions for reading raw mouse data —

Raw Input:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms645536(v=vs.85).aspx

RAWMOUSE structure:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms645578(v=vs.85).aspx

– where my primary interest is in the lLastX and lLastY values (with signed relative motion selected by usFlags), along with the sample times, but I don’t have the C++/# programming chops to make this work.

Can anyone show me, with sample code, how to access these values in real-time from Mathematica 7?

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Read More
  • Recent Posts

    • Trump’s Note to Biden
    • FSI Blog Series, Part IV: Staying Agile in Trying Times
    • Soci raises $80 million to power data-driven localized marketing for enterprises
    • Conversational Platform Trends for 2021
    • The Great Awakening?
  • Categories

  • Archives

    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited