Skip to main content

2011 | OriginalPaper | Buchkapitel

Path Queries in Weighted Trees

verfasst von : Meng He, J. Ian Munro, Gelin Zhou

Erschienen in: Algorithms and Computation

Verlag: Springer Berlin Heidelberg

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

We consider the problem of supporting several different path queries over a tree on

n

nodes, each having a weight drawn from a set of

σ

distinct values, where

σ

 ≤ 

n

. One query we support is the path median query, which asks for the median weight on a path between two given nodes. For this and the more general path selection query, we present a linear space data structure that answers queries in

$O(\lg \sigma)$

time under the word RAM model. This greatly improves previous results on the same problem, as previous data structures achieving

$O(\lg n)$

query time use

$O(n \lg^2 n)$

space, and previous linear space data structures require

O

(

n

ε

) time to answer a query for any positive constant

ε

[16]. Our linear space data structure also supports path counting queries in

$O(\lg \sigma)$

time. This matches the result of Chazelle [8] when

σ

is close to

n

, but has better performance when

σ

is significantly smaller than

n

. Finally, the same data structure can also support path reporting queries in

$O(\lg \sigma + occ \lg \sigma)$

time, where

occ

is the size of output. In addition, we present a data structure that answers path reporting queries in

$O(\lg \sigma + occ \lg\lg\sigma)$

time, using

$O(n\lg\lg\sigma)$

space. These are the first data structures that answer path reporting queries.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Metadaten
Titel
Path Queries in Weighted Trees
verfasst von
Meng He
J. Ian Munro
Gelin Zhou
Copyright-Jahr
2011
Verlag
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-642-25591-5_16